Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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

by Kenosis (Priest)
on Oct 02, 2012 at 16:05 UTC ( #996877=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $regex = join '|', map "\Q$_\E?", @filelist;
                      ^         ^ ^ ^^
    ...
                      |         | + - The default scalar aliased to each @
    +filelist element
                      |         + - Begin quote metacharacters (e.g., the 
    +period)
                      + - Join each element with alternation ("or") charac
    +ter
    
  2. or download this
    1234567_3a_20101000\.html?|99877_b_20111111\.html?|99877_c_20111111\.h
    +tml? ...
    
  3. or download this
    ->name(qr/^(?:$regex)$/)
              ^^^^^^^^^^^^
    
  4. or download this
    my @matchingFileNames = grep /pattern/, @found_html;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2014-07-12 23:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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








    Results (242 votes), past polls