Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: line by line match on an array of strings

by jbert (Priest)
on Jan 09, 2008 at 10:42 UTC ( #661306=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @typedefs = qw(...sorted list of typedefs, common ones first...);
    my @regexes = map { qr{$_} } @typedefs;
    ...
        last REGEX; # Stop looking
      }
    }
    
  2. or download this
    my @typedefs = qw(...sorted list of typedefs, common ones first...);
    # Make a big '(a|b|c|...)' regex str
    ...
    if ($line =~ $regex) {
        # found typedef so do work
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (14)
As of 2014-07-23 12:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (142 votes), past polls