Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Search through directories

by sauoq (Abbot)
on Jul 31, 2003 at 21:16 UTC ( #279798=note: print w/replies, xml ) Need Help??


in reply to Search through directories

If it had worked, how was your single scalar going to hold them all? And how was opendir going to open them all at once? And how were they all going to be associated with a single directory handle? One way or the other, you'll need to loop over them. That said, read perldoc -f glob for an easy way to get that to expand. You'll want to use it something like this:

for ( glob '/usr/home/*/logs' ) { # open the dir - handle errors # do stuff... }

-sauoq
"My two cents aren't worth a dime.";

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2022-11-27 08:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?