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.
You can even leave out the parenthesis on the print statement ;-)unless ($self->{ftp}->put($origin, $target)) { $msg = $self->{ftp}->message(); $cod = $self->{ftp}->code(); print "$cod: $msg\n"; return 1; }
In Section
Seekers of Perl Wisdom