Bukowski has asked for the wisdom of the Perl Monks concerning the following question:
I have been trying for a good hour now to figure out why this code is not working. I think it may be my ignorance of FTP coupled with my first use of Net::FTP.
This dies with the error:#!/usr/bin/perl -w use strict; use Net::FTP; my ($ftp, $destination, $username, $password, $filename, $path); $destination="genome.ucsc.edu"; $username="anonymous"; $password="me\@there.com"; $path="/goldenPath/05apr2002/chromosomes/"; $filename="chr5.zip"; $ftp = Net::FTP->new($destination, Debug => 0) || die "Couldn't connec +t! $!\n"; $ftp->login($username,$password) || die "Couldn't log in! $!\n"; $ftp->cwd($path) || die "couldn't cwd! $!\n"; $ftp->get($filename) || die "get($filename) failed: " . $ftp->code() . + ": " . $ftp->message(); $ftp->quit;
I am assuming this has something to do with a failure to use the pasv/port options of Net::FTP - I have tried ftp->pasv() and ftp->port() (leaving blank, and specifying a port). Its not a firewall issue as I can happily use a command line client to make it work - and grab the file.[dswan@ashtaroth GUP]$ perl ftp.pl get(chr5.zip) failed: 500: Illegal PORT command.
Yours, in bewilderment,
Bukowski - aka Dan (email@example.com)
"Coffee for the mind, Pizza for the body, Sushi for the soul" -Userfriendly
Title edit by tye
|Replies are listed 'Best First'.|
Re: Net::FTP and
by amphiplex (Monk) on Jul 17, 2002 at 11:08 UTC
OS related problem?
by Bukowski (Deacon) on Jul 17, 2002 at 11:05 UTC