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

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... }

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

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2024-05-20 06:06 GMT
Find Nodes?
    Voting Booth?

    No recent polls found