Debug Trace
-> perl -w ftp_files.pl Net::FTP>>> Net::FTP(2.71) Net::FTP>>> Exporter Net::FTP>>> Net::Cmd(2.24) Net::FTP>>> IO::Socket::INET Net::FTP>>> IO::Socket(1.1603) Net::FTP>>> IO::Handle(1.1505) Net::FTP=GLOB(0x5dde8)<<< 220 Microsoft FTP Service (Version 5.0). Net::FTP=GLOB(0x5dde8)>>> user test Net::FTP=GLOB(0x5dde8)<<< 331 Password required for test. Net::FTP=GLOB(0x5dde8)>>> PASS .... Net::FTP=GLOB(0x5dde8)<<< 230 user test logged in. Net::FTP=GLOB(0x5dde8)>>> CWD test Net::FTP=GLOB(0x5dde8)<<< 250 CWD command successful. Net::FTP=GLOB(0x5dde8)>>> ALLO 35 Net::FTP=GLOB(0x5dde8)<<< 200 ALLO command successful. Net::FTP=GLOB(0x5dde8)>>> PORT 10,208,8,134,156,192 Net::FTP=GLOB(0x5dde8)<<< 200 PORT command successful. Net::FTP=GLOB(0x5dde8)>>> STOR ndm_rpt_133.csv Net::FTP=GLOB(0x5dde8)<<< 150 Opening ASCII mode data connection for n +dm_rpt_133.csv. Can't locate object method "new" via package "Net::FTP::A" at /usr/per +l5/5.00503 /sun4-solaris/IO/Socket.pm line 253.
Code
use lib '/opt/autotree/autouser/perl_lib'; # Location of Net::FTP use strict; use Net::FTP; my $ftp = Net::FTP->new($ftp_server, Timeout => 30, Debug => 1) or die "Error: Cannot connect to FTP server $ftp_server $@\n"; $ftp->login($ftpid, $ftppwd) or die "Error: FTP Login Failed $@\n"; $ftp->cwd($ftp_file_dir) or die "Error: Unable to change to directory $ftp_file_dir $@\n"; $ftp->put($file) or die "Error: Cannot $ftp_cmd file $ftp_file $@\n"; $ftp->quit() or warn "Could not quit ftp session gracefully\n"; </p>
In reply to Net::FTP Error by cutter
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |