Changing the last line to the following should fix it:
my $pos = tell F; truncate F, 1 +$pos if $pos > 1;
--
John.
In reply to Re: Re: New Line at End File
by jmcnamara
in thread New Line at End File
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |