In the print (OUTFILE); you just print the empty string to the file you've just read from. So its content will be empty after you close the file.
You'd better open a temp file to print to and rename it later to the original file's name. File::Temp might help.
Hope this helps, -gjb-
In reply to Re: Writing to a file: problem
by gjb
in thread Writing to a file: problem
by Tricky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |