my $e = '0'; while (my $line = ) { $e++; my ($bucket, $num) = $line =~ m/^\s*(\d+)\s*\|\s*(\d+)/; push @{$HoA{$bucket}},$num; my $grand_total += $num; ## Sub Total = the running total per line up to 150, 75 and 55.? my $sub_total = "????"; ## the size of each anonymous array ## @Count[$bucket] += $num; ## I know this is super wrong ## print"Row $e / Number Array ($bucket) / Num ($num) / Array Size ($Count[$bucket])/ Sub Total ($sub_total) / Grand_Total ($grand_total)/n"; }