in reply to Re: using s///g;
in thread using s///g;

Is it possible to change the data without changing extension, name & path of the file????

Replies are listed 'Best First'.
Re^3: using s///g;
by Laurent_R (Canon) on Aug 06, 2015 at 12:46 UTC
    Nope, you essentially can't change a free-format sequential file like that. That's why, behind the scene, you have to rename your original file (say into file.old), and then write your changed content to a new file having the name of your original file.

    The alternative is to read the whole file into memory, make the changes in memory and then clobber the content of the original file and write the new content to it.

Re^3: using s///g;
by taiko (Sexton) on Aug 06, 2015 at 12:48 UTC
    The modified file will have same extension and name as original file
    Original/unmodified file will get new extension *.old.