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

Two different scripts that use Net::FTP to download compressed data have both started giving me corrupt archives when they are used to retrieve files. Comparing to the same files transferred with ncftp, I get identical file sizes but different checksums. The same thing occurred when I tried using Net::FTP on a different computer, making me think that something has changed on the server I am downloading data from. Has anyone seen anything like this?

Replies are listed 'Best First'.
Re: Net:FTP and corrupt data
by rasta (Hermit) on Jan 14, 2003 at 19:09 UTC
    I believe you just forgot to call binary() method before downloading the binary file.

    -- Yuriy Syrota
Re: Net:FTP and corrupt data
by genecutl (Beadle) on Jan 14, 2003 at 22:13 UTC
    Yup, that was it. I had scanned through the Net::FTP pod, but must have overlooked binary(). What through me off is that this used to work without having to specify binary. Thanks.
Re: Net:FTP and corrupt data
by MZSanford (Curate) on Jan 14, 2003 at 20:48 UTC
    I am thinking the same as rasta, what kinds of hosts are the two machines involved (Linux/UNIX/BSD,Win32,MacOS,&c.) ?
    from the frivolous to the serious