in reply to Hits on a reg expression
Replace your for section with this and give it whirl.
my $hits = () = $_ =~ /abcdef/g;
$total += $hits;
print "total: $total\n";
www.com | www.net | www.org
iterating over multiple values
Results (43 votes). Check out past polls.