Hi all, I've got a Perl Net::FTP problem. My script to get a file from my telstra adsl homepage doesn't work.
ncftpget -u myuserid -p mypassword ftp.users.bigpond.net.au /tmp index.html works fine but my script (see below) hangs at $ftp->get($filename); If I comment out the get line the script finishs execution. #$ftp->get($filename); Anyone know what the problem is? I am running this from the firewall (RH7.1) machine. From O'Reilly "Perl in a Nutshell" P441 Net::FTP #!/usr/bin/perl -w # ftpget.cgi rev1.0 21/02/2002 # get a file from an FTP site use Net::FTP; $hostname='ftp.users.bigpond.net.au'; $username='myuserid'; $password='mypassword'; $home='/'; $filename='index.html'; $ftp = Net::FTP->new($hostname); #construct object print "logging in\n"; $ftp->pasv(); $ftp->login($username,$password); print "logged in\n"; $ftp->cwd($home),"\n"; $directory=$ftp->pwd(); print "$directory\n"; $ftp->get($filename); print "logging out\n"; $ftp->quit; print "logged out\n"; exit; -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
