Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 a soft breeze sighs...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2017-04-23 07:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (430 votes). Check out past polls.