Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
The stupid question is the question not asked
 
PerlMonks  

Re: get list of files matching part of file name

by Anonymous Monk
on Jul 11, 2012 at 17:02 UTC ( #981201=note: print w/ replies, xml ) Need Help??


in reply to get list of files matching part of file name

use File::Find::Rule; my @filenames = qw[ sample.txt sample123.txt ]; my $reFilenames = join '|', map quotemeta, @filenames; $reFilenames = qr/$reFilenames/i; my @files = find( 'file' => 'name' => $reFilenames, 'maxdepth' => 1, 'in' => $dir );


Comment on Re: get list of files matching part of file name
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://981201]
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: (12)
As of 2014-04-21 13:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (495 votes), past polls