Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

(zdog) Re: How to pattern match filenames in readdir?

by zdog (Priest)
on Jun 05, 2001 at 21:07 UTC ( #85888=note: print w/ replies, xml ) Need Help??


in reply to How to pattern match filenames in readdir?

Try this:

opendir (DIR, "$dir") || die "cant open dir.\n"; my @files = grep { /BLAH/ } readdir (DIR); closedir (DIR); for (@files) { do something; }

Zenon Zabinski | zdog | zdog7@hotmail.com


Comment on (zdog) Re: How to pattern match filenames in readdir?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2015-07-04 12:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (59 votes), past polls