Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Fast/efficient way of check if a string in an strArr is contained in a line

by dragonchild (Archbishop)
on Nov 12, 2008 at 01:05 UTC ( [id://723041]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    foo.*bar
    \w+\d+\s+\d+:\d$
    
  2. or download this
    my @skips = get_skips(); # However you get them
    my $skip_regex = join '|', map { "(?:${_})" } @skips;
    ...
        next if /$skip_regex/;
        # Now you've checked everything.
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-23 21:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found