Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: ?: = Obfuscation?

by imp (Priest)
on Dec 01, 2006 at 16:30 UTC ( #587230=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # With ternary
    my $x = exists $hash{key}
    ...
    else {
        $x = 'default';
    }
    
  2. or download this
    # With ternary
    my $x = $x > 5
    ...
       $x++;
    }
    
  3. or download this
    my $x = $y > 5 ? ($y = 0) : ($y = 1);
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (15)
As of 2014-09-23 14:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (223 votes), past polls