in reply to Modify file without any temp variable

You can use the in-place edit option of Perl (see the -i option in perlrun):
{ local $^I = ''; #no backup of original! local @ARGV = qw(c:\\tuls\\tuls.txt); while ( <ARGV> ) { s/find/replace/g; print; } }

Paul

Replies are listed 'Best First'.
Re^2: Modify file without any temp variable
by GrandFather (Saint) on Jul 20, 2005 at 09:40 UTC

    I think you will find that that generates a temporary file, although not an explicit one. It is an option OP should look at though.


    Perl is Huffman encoded by design.