I think you will need to show us how you're running the program. My guess is that you're trying to run your program as follows:
perl -w 672099.pl <mymail.txt >mymail.txt
Running any program like that will always clobber the file, because that's how the shell works. It first creates all output files and then reads from all input files. But your output and input file are the same.
To see that Perl is not the problem, run your program without output redirection.
In reply to Re: Remove '>' from email
by Corion
in thread Remove '>' from email
by bluethundr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |