Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: How do I recursively process every file in a given directory?

by Dominus (Parson)
on Mar 12, 2000 at 02:24 UTC ( [id://5224]=note: print w/replies, xml ) Need Help??


in reply to How do I recursively process every file in a given directory?

use File::Find; find (\&wanted, $DIRECTORY); sub wanted { # this subroutine gets called once for each file # Inside this subroutine, $_ is set to the # name of the current file and the current # directory is the directory where that file # is stored }

See the manual for File::Find for more complete details.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-04-19 17:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found