What you have to do for this is,
you again open the file in write mode to write in the test.txt file.
open (FIN, "test.txt")|| die ("test.txt does not exists"); undef $/; $instr = <FIN>; open (FOUT, ">test.txt")|| die ("test.txt does not exists"); $instr =~ s|/prj/sw/tool|/prj/vlsi/toolsmodule|si; print FOUT "$instr";
Prasad
In reply to Re^5: change a line or string in file
by prasadbabu
in thread change a line or string in file
by sachin_chat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |