in reply to Hits on a reg expression
Replace your for section with this and give it whirl.
my $total; for(@files) { my $hits = () = $_ =~ /abcdef/g; print $hits,"\n"; $total += $hits; } print "total: $total\n";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Hits on a reg expression
by Anonymous Monk on Sep 16, 2003 at 10:38 UTC |
In Section
Seekers of Perl Wisdom