Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://85888]
help
Chatterbox?
[LanX]: such much?
[LanX]: We are speaking nothing but english now...
erix never really understood the need for rhyming slang
[erix]: it seems so far-fateched and illogical
[erix]: islanders a deviant bunch

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (11)
As of 2017-03-24 18:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (305 votes). Check out past polls.