Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 ;-)


Comment on Unless..
Download Code

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 wandering the Monastery: (4)
As of 2014-07-13 22:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (252 votes), past polls