There are some ways to do this, but they don't apply to all instances.
Really, you're usually better off just writing your changes to a temp
file and then replacing your original file. Most methods that seem to
accomplish what you are asking for really just do this in the background
anyway.
Thanks Tim..
Tim Johnson wrote:
There are some ways to do this, but they don't apply to all instances.
Really, you're usually better off just writing your changes to a temp
file and then replacing your original file. Most methods that seem to
accomplish what you are asking for really just do
Eliyah Kilada wrote:
Hi,
is there a method to _/directly/_ make:
while ( FIN)
{
$_ =~ s//x/g;
}
modify FIN?!
i.e., I need to make modifications in the same file I read from.
Thanks And Regards,
Eliyah
yeah, I do this often right at the command line:
perl -pi.bak -e
Raj (Basavaraj) Karadakal said:
Hi,
I am trying to modify some file sin place usinh the -i switch of
perl. In each of the files however I need to replace certain strings with
file name it self.
When I try the following command
perl -i.orig -pe 's/NAME/$0/' `ls -1`
Will replace
Raj == Raj Karadakal [EMAIL PROTECTED] writes:
Raj Hi,
RajI am trying to modify some file sin place usinh the -i switch of
Raj perl. In each of the files however I need to replace certain strings with
Raj file name it self.
Raj When I try the following command
Raj perl -i.orig -pe