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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2016-07-01 06:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (407 votes). Check out past polls.