Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^4: Matching against list of patterns

by Random_Walk (Prior)
on Sep 17, 2004 at 08:40 UTC ( [id://391710]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # we read a line from somewhere to $line
    # and @regex is our array of patterns
    foreach (@regex) {
        print "Match!\n" if $line=/$_/;
    }
    
  2. or download this
    # {
    #    my @matches;
    ...
    #    push @matches n if /nth_regex/;
    #    @matches;
    # }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-24 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found