in reply to
Regex to find/replace in a file
This can also be done on the cmd line verry easily:
perl -i.bak -lpe 's/foo/bar/g;' baz
[download]
This would replace all occurances of foo with bar in file baz backing up the original (unalterd file) to baz.bak
Comment on
Re: Regex to find/replace in a file
Download
Code
In Section
Seekers of Perl Wisdom