Using binmode is always good practice, regardless of the OS you're programming for - it has no overhead on systems that don't need it AFAIK
Your proposed method of printing into the new file has the drawback (or the effect) that neither the original file time nor the original file attributes (as they are on the file system) get preserved.
In reply to Printing into files clobbers the file time
by Corion
in thread moving files
by jntn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |