Hello kevbot:
Thank you for your solution. Since this task is for me to learn, took me a while to study one by one from the bottom up. Yours was the last.
I would like to know if it is possible for you to show me how print on the fly each row of the while loop with the array size and the sum total of each array.
Something like this:
my %data;
$e = '0';
while(<$fh>){
$e++;
chomp $_;
my ($key, $val) = split(/\|/, $_);
push @{$data{$key}},$val;
$Grand_Total += "$val";
my $size = scalar(@{$data{$key}}); ## WRONG doesn't print
$Sub_Total[$key] += $data{$key}[$val]; ## WRONG doesn't prin
+t
print"Row ($e) / Array Size [$size] key ($key) / Amount ($val
+) / Sub Total ($Sub_Total[$key]) / Grand_Total = ($Grand_Total)<hr>"
+;
}
Hope you can do it
Thanx
virtualweb