http://qs321.pair.com?node_id=394490


in reply to Error Handling.

I'd do it with an unless statement. It allows you to keep things almost as with the or but without the pitfalls.
unless ($self->{ftp}->put($origin, $target)) { $msg = $self->{ftp}->message(); $cod = $self->{ftp}->code(); print "$cod: $msg\n"; return 1; }
You can even leave out the parenthesis on the print statement ;-)