Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: Question about ternary operator

by moritz (Cardinal)
on Jul 01, 2009 at 08:52 UTC ( [id://776355]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # bad: ternary in void context: 
    exists($checked->{Group}{$GroupDN}) ? ($rc_OK=1) : ($rc_OK=check_group
    +($GroupDN,0));
    ...
    
    # also good: ternary in scalar context:
    $rc_OK = exists($checked->{Group}{$GroupDN}) ? 1 :  check_group($Group
    +DN,0)
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (7)
As of 2024-04-19 20:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found