Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Problem pulling directories out of an array.

by welchavw (Pilgrim)
on Feb 02, 2004 at 18:48 UTC ( #325951=note: print w/ replies, xml ) Need Help??


in reply to Problem pulling directories out of an array.

Directory handles are just fine, but I prefer the brevity provided by glob (though the Camel notes that readdir is faster, my typical scripts are such that "the less noise, the better").

use File::Glob qw(:globally); print join "\n", map {-d $_ ? $_ : ()} glob ('c:/foo/{*,.*}');

,welchavw


Comment on Re: Problem pulling directories out of an array.
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (11)
As of 2015-07-31 08:15 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 (275 votes), past polls