Company Name*345467*YW34567c*activitype*04/15/2004*11:34:10*123456789*1 Company Name Other*345467*YW34567c*activitype*04/15/2004*11:34:10*123456789*3 #### foreach (){ if (/^(.*?)*(.*?)*(.*?)*(.*?)*(.*?)*(.*?)*(.*?)*(.*?)$/gi){ #prin +t starting at the date push (@logg,$1); } } my %count; my $total_count; foreach my $element( @logg ) { #4 ++$count{$element}; $total_count++; } #Sort hash by its values foreach my $element (sort {$count{$a} <=> $count{$b}} keys %count){ print "Name: $elementShows:$count +{$element} times.
"; }