Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: Surprised by Perl parse of ternary operator

by BrowserUk (Pope)
on Dec 16, 2011 at 13:18 UTC ( #943942=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    ( ( $fred == 42) ? ( $config = 'k1') : ( $config ) ) = 'k2'; 
    
  2. or download this
    ( $fred == 42 ) ? ( $config = 'k1' ) : ( $config = 'k2' );
    
  3. or download this
    $lo = $hi = 0; 
    $x = 7; $mid = 5; 
    ...
    
    print "lo:$lo hi:$hi";;
    lo:0 hi:7
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2014-09-23 04:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (210 votes), past polls