Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

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 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?

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (None)
    As of 2021-10-18 00:56 GMT
    Find Nodes?
      Voting Booth?
      My first memorable Perl project was:

      Results (72 votes). Check out past polls.