in reply to Perl ftp

This is probably because you are transfering binary files but are not calling the binary method before the transfers and some line-ending conversion is being done.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: Perl ftp
by Chon-Ji (Novice) on Jul 03, 2006 at 02:35 UTC
    what is the binary method? how doicall it? thanks

      From the Net::FTP docs:

      binary

      Transfer file in binary mode. No transformation will be done.

      Hint: If both server and client machines use the same line ending for text files, then it will be faster to transfer all files in binary mode.

      Just call it (once) before transferring any files. Something like:

      $ftpobj->binary; $ftpobj->get( $inputfile, $outputfile ) or die $!;

      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.