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

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Need Help ASAP
  • Comment on Why do I get a blank file on the receiving end?

Replies are listed 'Best First'.
Re: Why do I get a blank file on the receiving end?
by btrott (Parson) on Mar 25, 2000 at 02:33 UTC
    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.