First of all, don't ask a new question by editing your previous one and replacing the text. It makes my above reply look completely irrelevant.
As for creating a temporary file, there are lots of ways to do it. One that might work for you is to just add an extention on the name of the existing file:
open(NEW,">$dir/$file.new") or die "Can't open $dir/$file.new: $!"
-b
In reply to Re^3: Inserting Text into Files within a Directory
by bgreenlee
in thread Inserting Text into Files within a Directory
by LF
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |