Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: if/else syntax

by Herkum (Parson)
on Jun 26, 2009 at 16:03 UTC ( #775098=note: print w/replies, xml ) Need Help??


in reply to if/else syntax

The closest thing I can think of, is using a return statement in your call. So you have to be specific in your usage. FYI, I use this syntax all the time because it is very easy to read.

sub checkConditions { my $value = shift; return someFunc() if $value == 0; return otherFunc(); }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://775098]
help
Chatterbox?
[Discipulus]: the fun is the mother used to say ' two left hand' to describe people unabel to manual work..

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2018-02-19 12:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (264 votes). Check out past polls.

    Notices?