Re: FTP from Perl script on Windows
- From: "Sisyphus" <sisyphus1@xxxxxxxxxxxxxxxxx>
- Date: Thu, 28 Sep 2006 19:03:18 +1000
"Ivan L" <ilackic@xxxxxxxxx> wrote in message
news:Xns984C6A9E0F938ivanlac@xxxxxxxxxxxxxxxxxx
perl script), and
I have tried to use FTP from Perl (not using System() but directly from
found out that all the sample programs found on the Internet don't work.Further investigation showed
that there is following error3."
"Cannot connect to host: Net::FTP: Bad protocol 'tcp' at ftptest1.pl line
host: $@";
The part of the perl script that caused this error is:
1.#!/usr/bin/perl -w
2. use Net::FTP;
3. $ftp = Net::FTP->new("Host", Debug => 0) or die "Cannot connect to
Can't see anything that should pose a problem (assuming "Host" is replaced
by the valid string for whatever your host really is).
The following works fine for me on Win32:
use warnings;
use Net::FTP;
$ftp = Net::FTP->new("rtfm.mit.edu", Debug => 1)
or die "Cannot connect to host: $@";
$ftp->login('anonymous','anonymous');
$ftp->cwd("/pub/usenet-by-group/");
$ftp->quit;
What does that script produce for you ?
Cheers,
Rob
.
- Follow-Ups:
- Re: FTP from Perl script on Windows
- From: Ivan L
- Re: FTP from Perl script on Windows
- References:
- FTP from Perl script on Windows
- From: Ivan L
- FTP from Perl script on Windows
- Prev by Date: Re: Questions about Inline::C
- Next by Date: Re: FTP from Perl script on Windows
- Previous by thread: FTP from Perl script on Windows
- Next by thread: Re: FTP from Perl script on Windows
- Index(es):
Relevant Pages
|