in reply to Re^3: change a line or string in file
in thread change a line or string in file

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^5: change a line or string in file
by prasadbabu (Prior) on Jan 19, 2005 at 11:13 UTC

    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