Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

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 <$i; done

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

Replies are listed 'Best First'.
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://985698]
[erix]: didn't Sybase have pretty good auditing? :) (this is a vague memory)
[erix]: (culprits often are upstream of db of course)
[Corion]: Ah, how I missed it. After some years, I revisit slashdot on a click-bait link, and it provides the usual humor instantly: "I didn't know Drupal had rules for sex. It must be a plug-in"
[Corion]: erix: This is not for sybase, but for the input data files, resp. their contents.

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2017-03-28 09:03 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (328 votes). Check out past polls.