You could use an 'if' and set error flags (or test the error condition directly), or you could use a do{ }; block, which would avoid having to keep track of precedence (as ysth pointed out):
$self->{ftp}->put($origin, $target) or do { $msg = $self->{ftp}->message(); $cod = $self->{ftp}->code(); print ("$cod: $msg\n"); return 1; };
In reply to Re: Error Handling.
by bobf
in thread Error Handling.
by fjaenale
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |