Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Unless..

by htoug (Deacon)
on Sep 28, 2004 at 07:59 UTC ( #394490=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://394490]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (14)
As of 2018-05-22 13:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?