the file size remains the same but the file looks empty. All the characters in the file are being replaced with NULL values
Two questions:
When was the last time you tried using a common command line ftp utility to replicate what the perl script is doing, to see whether it was just the perl script, or just the ftp connection?
When you say "the file looks empty...replaced with NULL values", it's not entirely clear whether this means the contents are all null bytes, or whitespace, or other "invisible" character codes. Have you done a hex dump of the file content (e.g. using "od") to see what the delivered byte values really are?