Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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

by kennethk (Abbot)
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 making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2016-06-25 05:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (323 votes). Check out past polls.