wishartz has asked for the wisdom of the Perl Monks concerning the following question:
Thanksif ($var eq "Y") { open(FTP,'| ftp -i -v -n ') or die "Couldn't run FTP: $!\n"; my $ofh = select(FTP); $|=1; select($ofh); print FTP "open $FTP_HOST\n"; print FTP "quote USER $FTP_USER\n"; print FTP "quote PASS $FTP_PASS\n"; print FTP "cd $FTP_DIR\n"; print FTP "bin\n"; print FTP "get $FTP_FILE\n"; print FTP "bye\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Capturing FTP output
by moritz (Cardinal) on May 15, 2008 at 12:16 UTC | |
by wishartz (Beadle) on May 15, 2008 at 13:55 UTC | |
by starbolin (Hermit) on May 15, 2008 at 21:45 UTC | |
|
Re: Capturing FTP output
by derby (Abbot) on May 15, 2008 at 14:52 UTC | |
by bingos (Vicar) on May 16, 2008 at 07:06 UTC |