Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: regex patterns

by crouchingpenguin (Priest)
on Jan 31, 2003 at 03:00 UTC ( [id://231504]=note: print w/replies, xml ) Need Help??


in reply to regex patterns

#!/usr/bin/perl use strict; use warnings; + die unless $ARGV[0]; my ($reg,$count) = (qr/$ARGV[0]/,0); open( my $fh, '<data.txt') or die; $count += scalar( my @m = m/$reg/g ) while( <$fh> ); print $count,"\n";


"Never be afraid to try something new. Remember, amateurs built the ark. Professionals built the Titanic."

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-03-29 11:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found