Gossamer Forum
Home : General : Perl Programming :

NET::ftp hangs after remote log on

Quote Reply
NET::ftp hangs after remote log on
Hi

I installed Libnet-1.13 and got a test program running NET::ftp.

It seems to log on to the remote server and change diretory OK but refuses to get files or list the directory.

Is there something I should do on the remote server? Is there something I should do in the Libnet-1.13/Configure script?

I just ran the program from the Telnet command line.

Here's the code I was using:

#!/usr/bin/perl

use Net::FTP;

$switch = '-g';
$user = 'myuserid';
$password = 'mypassword';
$server = 'www.domain.co.uk';
$filename = 'filename.txt';
$path = '/usr/local/www/myremotepath';
$localpath = '/pub/home/htdocs/mylocalpath';


$ftp = Net::FTP->new($server); # contact server
$ftp->login($user, $password);
print "Logged on\n";
$ftp->cwd($path);
print "Changed directory to $path\n";
print "About to list the directory\n";
$ftp->ls || die "Failed to list\n";
print "About to get file $path $filename and put it in $localpath\n";
$ftp->get($filename, $filename, $localpath) || die "Failed to get $path $filename\n";

print "About to quit\n";

$ftp->quit();





Any help would be great.



Thanks
Subject Author Views Date
Thread NET::ftp hangs after remote log on Blurry 4765 Apr 11, 2003, 2:16 PM
Post Re: [Blurry] NET::ftp hangs after remote log on
cornball 4617 Apr 13, 2003, 10:13 PM
Thread Re: [Blurry] NET::ftp hangs after remote log on
Paul 4630 Apr 14, 2003, 1:42 AM
Post Re: [Paul] NET::ftp hangs after remote log on
Blurry 4583 Apr 15, 2003, 3:24 PM