I have a perl script that uses FTP. If the ftp server can not be
conected to I want to write to a log file and exit with a return code
of 1.
Something like
my $ftp = Net::FTP->new( $remote_host ) or {
print LOGFILE "failed to connect to $remote_host\n"
return(1);
};
But this does not work. So how do I do 2 statements for an or?
Ben
--
Ben Edwards - Bristol, UK
If you have a problem emailing me use
http://www.gurtlush.org.uk/profiles.php?uid=4
(email address this email is sent from may be defunct)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/