If it is consistantly 2 bytes, and the program works if you remove them, then use truncate.
If you know how long the file is, use it on the filehandle before you close it.
If not, truncate $filename, -s( $filename ) - 2; after you've closed the filehandle might do the trick.
In reply to Re: Remove Extra bytes at end of file
by BrowserUk
in thread Remove Extra bytes at end of file
by slloyd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |