http://www.perlmonks.org?node_id=6118


in reply to Why do I get a blank file on the receiving end?

Then how do you know the file transferred through the socket correctly?

In the line where you're printing to the file, try just printing to the terminal instead (instead of

print FILE $_;
just use
print $_;
Also, is this a binary file? It's possible that you may need to use read instead of the <> operator. And perhaps binmode as well.