Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: How-To on Perl one-liners

by Thilosophy (Curate)
on Apr 03, 2005 at 22:09 UTC ( #444544=note: print w/replies, xml ) Need Help??


in reply to How-To on Perl one-liners

There is a nice tutorial on mass-editing of files on perl.com. The complete list of all the useful command line switches is in the perlrun manual.

What I like to do is combine Perl (to process the files) with the UNIX command line tool "find" (to make the list of files to hand to Perl). If you are on Windows, you can still go with the File::Find module (examples for this are in above tutorial).

Another thing to watch out for if you are writing one-liners with "perl -e" is that you easily run into quoting problems (totally depends on the shell you are using), see Escaping characters in one-liners.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2020-01-28 08:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?