[Perl] Question

Shlomo Yona shlomo at cslx.haifa.ac.il
Tue Jun 4 05:46:04 PDT 2002


On Tue, 4 Jun 2002, Einat Wizeman wrote:

> 	I would like to know how can I replace one string to another  in a
> file 
> 
> 
> 	For example:
> 
> 	Temp.c        ----->        Temp.c 
> 
> 	Print "Einat";               Print "Shalom";

Here you go (from the unix prompt):

	$ perl -pi -e 's/Print "Einat"/Print "Shalom"/g' Temp.c




-- 
Shlomo Yona
shlomo at cs.haifa.ac.il
http://cs.haifa.ac.il/~shlomo/




More information about the Perl mailing list