in reply to Error Handling.

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; };