Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Search through directories

by sauoq (Abbot)
on Jul 31, 2003 at 21:16 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-20 04:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found