Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Useless unless

by friedo (Prior)
on Aug 06, 2005 at 04:10 UTC ( [id://481434]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Useless unless
in thread Useless unless

I still don't think I quite get this otherwise groove. Would

$a if $b, otherwise $c;

Be equivalent to

$b ? $a : $c;

?

If so, I guess that's kinda cool, if a little confusing. We already have differently-binding text equivalents for the usual symbolic logical operators, why not the good ol' ternary conditional?

FWIW, I use unless instead of if ! all the time. In fact, I am routinely dissapointed by the fact that we don't have a built-in elsunless. :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://481434]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-19 10:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found