[Chicago-talk] replace in place

JT Smith jt at plainblack.com
Fri Mar 11 12:20:20 PST 2005


I remember having a really great tutorial on doing things in one line from the command 
line in perl, but I can't remember how it all worked. Could somebody help me out? I have 
a make file that has a line in it I wish to replace. The line looks like:

prefix=/usr/local

And I would like it to be

prefix=/data/prereqs

I can very easily write a little script to read in the file find and replace that 
string, but I'd rather do the cool single command line trick.

Thanks for the help.


JT ~ Plain Black
ph: 703-286-2525 ext. 810
fax: 312-264-5382
http://www.plainblack.com

Create like a god, command like a king, work like a slave.


More information about the Chicago-talk mailing list