Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: How can I run an folder full of text files through a perl script?

by GrandFather (Sage)
on Dec 08, 2012 at 10:09 UTC ( #1007881=note: print w/ replies, xml ) Need Help??


in reply to How can I run an folder full of text files through a perl script?

If you mean have a script process all the files in a folder (rather than using a loop to invoke the script for each file in the folder in turn) then you can either (using OS magic - *nix in particular) pass all the files on the command line using a glob (*), or you pass the folder into the script and use either File::Find or opendir/readdir to run through the files and process them.

True laziness is hard work


Comment on Re: How can I run an folder full of text files through a perl script?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2015-07-28 05:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (252 votes), past polls