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

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/{*,.*}');


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://325951]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2017-02-20 03:22 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (293 votes). Check out past polls.