Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Favourite One-liners?

by Tanktalus (Canon)
on Jun 28, 2005 at 01:35 UTC ( #470442=note: print w/replies, xml ) Need Help??


in reply to Favourite One-liners?

perl -pi~ -e 's/foo/bar/' *.xyz

I often have to go through a list of files and make minor tweaks to them. And we're talking about 150-200 files. It blows my coworkers' minds away that I can do search&replace that quickly.

IIRC, this is actually what got me started on perl in the first place. I am waaaay too lazy.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://470442]
help
Chatterbox?
[Lady_Aleena]: Would you use a module that is almost 150 characters to type with the use and importing all subroutines?
[LanX]: use module :all ?
[Lady_Aleena]: Lax, that would take it down to a little less than 100 characters. The module name is nearly 80 characters long.

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2017-05-24 21:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?