L
lucas
having trouble listing the files using Net::FTP:
print ">Connecting...";
my $ftp = Net::FTP->new($addy, Port => $port, Debug => $debug) || die
"Could Not Connect\n";
print "Done\n";
print ">Logging in...";
$ftp->login($user,$pass) || die "Can't Log In\n";
print "Done\n";
print ">Listing files...";
@_ = $ftp->ls();
print "Done\n";
print "@_\n";
this code returns:
Net::FTP=GLOB(0x82de9d8)>>> PORT 192,168,0,2,129,26
Net::FTP=GLOB(0x82de9d8)<<< 200 PORT command successful.
Net::FTP=GLOB(0x82de9d8)>>> NLST
Net::FTP=GLOB(0x82de9d8)<<< 150 Opening ASCII mode data connection for file
list.
Net::FTP=GLOB(0x82de9d8)<<< 226 Transfer complete.
printing @_ just shows "ARRAY(0x8308ef8)". this is the way it's done in the
examples. anybody know what's wrong with it?
regards,
print ">Connecting...";
my $ftp = Net::FTP->new($addy, Port => $port, Debug => $debug) || die
"Could Not Connect\n";
print "Done\n";
print ">Logging in...";
$ftp->login($user,$pass) || die "Can't Log In\n";
print "Done\n";
print ">Listing files...";
@_ = $ftp->ls();
print "Done\n";
print "@_\n";
this code returns:
Net::FTP=GLOB(0x82de9d8)>>> PORT 192,168,0,2,129,26
Net::FTP=GLOB(0x82de9d8)<<< 200 PORT command successful.
Net::FTP=GLOB(0x82de9d8)>>> NLST
Net::FTP=GLOB(0x82de9d8)<<< 150 Opening ASCII mode data connection for file
list.
Net::FTP=GLOB(0x82de9d8)<<< 226 Transfer complete.
ARRAY(0x8308ef8)Listing files...Done
printing @_ just shows "ARRAY(0x8308ef8)". this is the way it's done in the
examples. anybody know what's wrong with it?
regards,