in reply to Issues with files on a windows machine

The file on your unix box is bad.
Text files in Windows end with CRLF.
Text files in unix end with LF.
You should have:

Windows file length1351
Linux file length1335
Windows var length1335
Linux var length1335

If it's not a text file, you should be using binmode on the file handle. That'll prevent the CRLF<->LF conversion.