Thank you, Trevor.
Your sample is helpful.
However, the timeout value I set doesn't do.
The timeout occurs in 45 seconds regardless of the timeout value.
I wonder what's wrong.

Apart from this, how can we change the directory of local host, which we can
do it by "lcd" command when executing FTP by windows/NT commands?

Thanks,

H.Nakamura

-----Original Message-----
From: Trevor Joerges [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 19, 2002 1:37 AM
To: Nakamura, Hisashi; [EMAIL PROTECTED]
Subject: Re: FTP using Win32:Internet


Yes - check to see if the condition was successful. If it isn't then do
something and continue.
i.e:

foreach $ftpserver (@ftpservers) {
    if (!$ftp = Net::FTP->new($host, Debug => 0, Port => 21, Passive =>
True, Timeout => 60)) {
        # do something like write to log file
    }
    else {
        next;
    }
}

You'll probably want to put this type or a similar success check around
most/all your ftp commands if you are expecting to catch failures and
continue to the next server upon a failure.

Hope this helps.
Kind regards,
Trevor J. Joerges
--------------------------------------------
$_=q;rrUSFWPSZK.ZKPFSHFT,rkvtuZbopuifsZQZibdl
rrqpxfsfeZcyZQ,,riuuq://xxx.%.dpn,ru~@%.dpn ,rrr8-)
;;s;\~;kpfshft;g;s;\%;tfoenjnf;g;y;B-x;A-w;;
s;P;perl;g;s;,;\n;g;s;Y; ;g;s;q;\t;g;print;
--------------------------------------------


----- Original Message -----
From: "Nakamura, Hisashi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 04, 2002 5:55 AM
Subject: FTP using Win32:Internet


| I want to write a script which performs FTP function using Win32:Internet.
| The function of the script will be sending files to several remote servers
| one by one.
| The problem is that when the connection to the first server failed, the
| program stopped and doesn't move on to the connection to the next server.
| How can I solve this problem?
|
| *****************************
| Hisashi Nakamura
| Systems-Sales Engineer
| Dow Jones (Japan)
| Phone +81-3-5220-2739
| FAX    +81-3-5220-2746
| *****************************
| _______________________________________________
| Perl-Win32-Users mailing list
| [EMAIL PROTECTED]
| To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
|
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to