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

Re: Word replace - notetab light vs perl

by b10m (Vicar)
on Oct 05, 2005 at 18:32 UTC ( #497694=note: print w/replies, xml ) Need Help??


in reply to Word replace - notetab light vs perl

This is why I like sed ;-)

$ sed -i 's/wrongs/wrongs3/' wrongs
--
b10m

All code is usually tested, but rarely trusted.

Replies are listed 'Best First'.
Re^2: Word replace - notetab light vs perl
by itub (Priest) on Oct 05, 2005 at 18:37 UTC
    I usually do it like this:

    $ perl -i -pe 's/wrongs/wrongs3/' wrongs

    This is good if you don't have a recent version of GNU sed (only those have the -i option). I use it often enough that I have alias pp="perl -i -pe".

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (11)
As of 2023-02-01 13:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (4 votes). Check out past polls.

    Notices?