in reply to inline file modification

This code block will do an inplace edit for the file mydata.txt. $^I allows you to specify the backup file extension.

You can turn off backup feature but it is dangerous or rather not a good idea.

code below is untested

{ local $^I = ".bak"; local *ARGV; @ARGV = "mydata.txt"; while (<>) { s/idTag/newTag/g; print; } }

Replies are listed 'Best First'.
Re^2: inline file modification
by Woodchuck (Initiate) on Sep 07, 2005 at 17:07 UTC
    sounds interesting thank you.