drock has asked for the wisdom of the Perl Monks concerning the following question:
sub ftpme { my $remotehost="ftp.foo.com"; my $remotedir="archive"; my $user="xxxxx"; my $pass="xxxxxx"; my $data=$scratchtps; my $ftplog="/usr/local/log/ftp_IrMt_scratchtapes.log"; my $ftp = Net::FTP->new($remotehost, Debug => 10) || die "Cannot connect to $remotehost: IronMt: $!, pri +nt ($ftplog)"; $ftp->login($user, $pass) or die "Login failed!: $!, p +rint ($ftplog)"; $ftp->ascii(); $ftp->cwd($remotedir); $ftp->put($data) or die "FTP put to IrMt failed!: $!, +print ($ftplog)"; $ftp->quit; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::FTP and putting errors to STDOUT???
by ikegami (Patriarch) on Sep 17, 2004 at 17:27 UTC | |
by drock (Beadle) on Sep 17, 2004 at 17:39 UTC | |
by ikegami (Patriarch) on Sep 17, 2004 at 18:30 UTC |