-----------------8<---------------------------------------------------------
-

## long-time operations here:

    $ftp = Net::FTP->new($site,
                     Timeout => 60,
                     Passive => 1,
                     Debug => 3)
    or die "Can't connect: $@\n";
    $ftp->login($username,$password)
    or die "Couldn't authenticate.\n";
-----------------8<---------------------------------------------------------
-

Suggestion: you call a subroutine should the connection fail.
The great thing is you're actually half way there with the 'or die'.

I suggest you try something akin to:-

$ftp = Net::FTP->new($site, Timeout => 60, Passive => 1, Debug => 3) ||
\&SendMail

Where \&SendMail is a reference to a subroutine that holds the code to send
mail.


Just in - Engineer by name, butcher by profession . . .

perl -e "@n=split(//,'f96:v4*MdE*^=!N&[AjJJJKaD75');
@s=split(//,',LENV]DmIek0RU&C)a:/8&k47RG'); foreach
$i(0..$#n){while(1){$c=chr(28+int rand(1+255-28));if($c eq
($n[$i]^$s[$i])){sleep 1;print $c;last;}else{print \"$c\b\";}}}"
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to