Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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

by karlgoethebier (Parson)
on Dec 08, 2012 at 20:14 UTC ( #1007923=note: print w/ replies, xml ) Need Help??


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

Karl-Mac-mini:find karl$ find . -type f -name "*.txt" | xargs ./perl.p +l bar foo

Update: or find . -type f -name "*.txt" -exec ./perl.pl {} \;

See find, xargs

Update: For xargs vs exec see: 1 2 3

Regards, Karl

«The Crux of the Biscuit is the Apostrophe»

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (11)
As of 2016-08-25 16:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (361 votes). Check out past polls.