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

Re: ?: = Obfuscation?

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

Help for this page

Select Code to Download


  1. or download this
    if    ( $score >= 90 ) { $grade = 'A'; }
    elsif ( $score >= 80 ) { $grade = 'B'; }
    #...
    else                   { $grade = 'F'; }
    
  2. or download this
    $grade = ( $score >= 90 ) ? 'A'
           : ( $score >= 80 ) ? 'B'
           : ( $score >= 70 ) ? 'C'
           : ( $score >= 60 ) ? 'D'
           :                    'F';
    
  3. or download this
    if    ( $score >= 90 ) {
        $grade = 'A';
    ...
        $grade = 'B';
    }
    #...
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (15)
As of 2014-10-01 17:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (30 votes), past polls