in reply to $ftp not connecting to server
Hmmm ... creating a tmp file and exec'ing it isn't very perlish. Using what you have, your Net::FTP should look like this:
(and that's pretty much straight out of the docs).#!/usr/bin/perl use strict; use warnings; use Net::FTP; my $ftp = Net::FTP->new( "windows.ftp.server", Debug => 0 ) or die "Cannot connect to windows.ftp.server: $@"; $ftp->login( "userid","password" ) or die "Cannot login ", $ftp->message; $ftp->cwd( "/download" ) or die "Cannot change working directory ", $ftp->message; $ftp->get( $downFile, $ftpFile ) or die "get failed ", $ftp->message; $ftp->quit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: $ftp not connecting to server
by IronCore (Initiate) on Oct 09, 2009 at 21:56 UTC | |
by derby (Abbot) on Oct 10, 2009 at 02:00 UTC | |
by IronCore (Initiate) on Oct 12, 2009 at 18:12 UTC | |
by IronCore (Initiate) on Oct 12, 2009 at 16:41 UTC | |
by derby (Abbot) on Oct 12, 2009 at 16:54 UTC | |
|
Re^2: $ftp not connecting to server
by IronCore (Initiate) on Oct 09, 2009 at 22:14 UTC |