Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Replacing a string in a file

by Aristotle (Chancellor)
on Jul 16, 2003 at 16:41 UTC ( [id://274919]=note: print w/replies, xml ) Need Help??


in reply to Replacing a string in a file

Hmm.. the simplest form is something like
$ perl -pi.bak -e's/foo/bar/' file1 file2 ..
Look for the documentation of the -p and -i switches in perldoc perlrun. In what context are you trying to do this?

Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-04-20 03:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found