Hey everyone, I'm writting a simple script that takes data from a text file
and calculates percentages. Lets call this file "data.txt" In data.txt,
there are some numbers separated by "|" symbols like below:
2000|1800|500
I will open the file and get its data like this:
open (list, "<data.txt") or &error("Unable to open the data file for
reading");
$list=<list>;
close(list);
I will now split the data like this:
chomp ($list);
($total,$bought,$sold)=split(/\|/,$list);
Now I need help writting a set of commands that will calculate the
percentages of this data. I would like to have it in this format:
print "Total was ...
Bookmarks