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

Re: run a perl script for all files in a folder

by aaron_baugher (Deacon)
on Aug 06, 2012 at 13:01 UTC ( #985698=note: print w/ replies, xml ) Need Help??


in reply to run a perl script for all files in a folder

Wrapping one perl script in another perl script just to loop through files tends to look like overkill to me. Just use the shell:

$ for i in folder/* ; do perl addclause.pl <$i; done

Aaron B.
Available for small or large Perl jobs; see my home node.


Comment on Re: run a perl script for all files in a folder
Download Code
Re^2: run a perl script for all files in a folder
by lakssreedhar (Acolyte) on Aug 08, 2012 at 05:45 UTC

    2 Aaron.I tried the shell but it produces an error like cannot open the file

      Thanks Aaron,your shell script worked

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2014-12-19 01:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (70 votes), past polls