Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

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

by GrandFather (Cardinal)
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 cooling their heels in the Monastery: (6)
As of 2014-07-30 01:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls