Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Ternary operators: a hinderance, not a help

by Tanalis (Curate)
on Aug 09, 2005 at 15:16 UTC ( [id://482240]=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $number;
    if( $logical_test ) {
    ...
    else {
      $number = 0;
    }
    
  2. or download this
    my $number = $logical_test ? $value : 0;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://482240]
Approved by Mutant
Front-paged by Old_Gray_Bear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-19 11:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found