Help for this page
if ( $line =~ m@Users of Product@ ) { $line =~ m@Product(\d+):@; # match and capture product number $product = $1l
$line = s/\s+//; #get rid of the leading spaces my @f=split(/[\s\t]+/,$line); ... $counter{$user} = [] if ( ! defined($counter{$user}) ) ; $counter{$user}->{$product}++;