Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Hits on a reg expression

by Mr. Muskrat (Canon)
on Sep 15, 2003 at 20:30 UTC ( [id://291646]=note: print w/replies, xml ) Need Help??


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
    Thanks it works great.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://291646]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-24 06:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found