Hello All,
I am a newbie. I need a quick script to read in a file and replace certain text with new text. Is it possible to read and write to the same file?
My current script has this in it. but when I ran it it did not do squat!!
=======script code========
open(CS, "$currscript"
;
while(<CS>) {
$_ =~ s/QAS/MSP6GA/;
}
===========================
Or do I need to write out to another file with the replaced text?
Thanks in Advance!
Alex-
I am a newbie. I need a quick script to read in a file and replace certain text with new text. Is it possible to read and write to the same file?
My current script has this in it. but when I ran it it did not do squat!!
=======script code========
open(CS, "$currscript"
while(<CS>) {
$_ =~ s/QAS/MSP6GA/;
}
===========================
Or do I need to write out to another file with the replaced text?
Thanks in Advance!
Alex-