Keep It Simple, Stupid | |
PerlMonks |
Unable to complete download with Net::FTPby Itatsumaki (Friar) |
on Nov 28, 2003 at 21:45 UTC ( [id://310789]=perlquestion: print w/replies, xml ) | Need Help?? |
Itatsumaki has asked for the wisdom of the Perl Monks concerning the following question: I found a piece of old code that I had written that goes to an FTP site and retrieves a file via LWP::Simple:
I thought: hey, that's silly because it loads the whole file into a variable. Why not rewrite it with Net::FTP? That should be shorter, clearer code, as well as much faster.
The problem is, when I run the file downloaded via Net::FTP through a gzip -t it indicates a corrupt archive. When I get it from LWP::Simple, the archive seems valid. I've reproduced this on a couple of machines, but they are all behind the same router: can anyone validate this from other machines? Any ideas what's causing the FTP download to be invalid? -Tats Update: Warning! The downloaded file is rather large ~30 MB. (thanks for point it out b10m)
Back to
Seekers of Perl Wisdom
|
|