FTP Perl Script File Size Mismatch.

Hello,

I've written a Perl script that copies a set of files from one server to another.

Prior to transferring a file the script gets the file size from the source system and compares this to the file size received in the target system.

Except that the file sizes are slightly different.

Although I don't issue a binary command, I am fairly sure the transfer is made binary because I am testing with a compressed copy of the 'ls' executable, which runs fine on the target system.

A manual transfer using FTP at the command line shows no difference in the file sizes and all my tests are the same. This only happened when run against my live systems and files.

Apart from the difference between binary and ASCII transfer, has anyone any ideas why the file sizes would be slightly different?

Thanks.

Yes, I have noticed the same. Although I dont know the answer either, I take it that some metadata on the file could be kept on one system and not the other.