Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Search array of file names in directory structure

by kennethk (Monsignor)
on Oct 01, 2012 at 17:34 UTC ( #996698=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $regex = do {
        my @escaped;
        push @escaped, quotemeta for @filelist;
        my $joined = join '|', @escaped;
        qr/^(?:$joined)$/;
    };
    
  2. or download this
    my $regex = '^(?:' . join('|', map quotemeta, @filelist) . ')$';
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2014-07-12 10:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (239 votes), past polls