FTP from Perl script on Windows




I have tried to use FTP from Perl (not using System() but directly from perl script), and
found out that all the sample programs found on the Internet don't work. Further investigation showed
that there is following error

"Cannot connect to host: Net::FTP: Bad protocol 'tcp' at ftptest1.pl line 3."

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 host: $@";

I use Windows XP SP2 and ActiveState Perl 5.8.7. Also, I have tried to use Windows 2003
server, with the same result.
Can anybody help with this? The FTP server on machine "host" is up and running, using command
line I can FTP without problem.
.



Relevant Pages

  • Re: How to use all of libwww-perl-5.808 from a local install
    ... have shell access so this all has to be done via a Perl script. ... ftp> cd libwww-perl-5.808 ... 150 Opening ASCII mode data connection for /bin/ls. ... "Others make web sites. ...
    (comp.lang.perl.misc)
  • net:scp Host key verification failed
    ... I am using ftp in perl script with no problem. ... $SCP->quit if $newerr; ... Here the error message: ...
    (comp.lang.perl.misc)
  • net:scp Host key verification failed
    ... I am using ftp in perl script with no problem. ... $SCP->quit if $newerr; ... Here the error message: ...
    (comp.lang.perl.misc)
  • Re: grep Net::FTP
    ... I want to write a perl script which will get files from multiple directories ... Your regular expression pattern matches exactly the string '*KO_SPLT*' but there are no '*' characters in the string '07_KOL_KO_SPLT_20090402.txt.gz' so grep returns an empty list which is false and the program dies with your error message. ... Please enter the directory name to ftp files: ...
    (perl.beginners)
  • Re: HTTP File Posting
    ... > automatic way using a perl script on a Windows machine. ... > use FTP as I have to put passwords in the script. ... > Is there a way to have a perl program send a local file to a remote ... Unfotunately, I use FTP. ...
    (comp.lang.perl)