As often as not for things like this, I just make the script print to STDOUT and put the file handling stuff on the command line -- why right write more lines of perl code to do stuff that the shell can do for me with an angle bracket?
text-altering-script.perl input.file > output.file # optional step: mv output.file input.file
In reply to Re^3: Searching and replacing text
by graff
in thread Searching and replacing text
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |