Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: How-To on Perl one-liners

by Thilosophy (Curate)
on Apr 03, 2005 at 22:09 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://444544]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-19 02:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found