Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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?
[Discipulus]: it seems some signal is issued but only by services
[Discipulus]: which one choroba?
[choroba]: Perlingo
[Discipulus]: Perl In Go?

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2017-01-17 09:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (154 votes). Check out past polls.