Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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

by aaron_baugher (Curate)
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 about the Monastery: (6)
As of 2015-07-06 22:58 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 (85 votes), past polls