Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: if/else syntax

by Herkum (Parson)
on Jun 26, 2009 at 16:03 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://775098]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-16 04:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found