Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: Two simple code style advice questions (no reassembly required)

by tye (Cardinal)
on Jan 18, 2013 at 17:25 UTC ( #1014094=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $mol =  defined $n ? ( $n == 42 ? 'fourty two' : '' ) : 'n/a';
    
  2. or download this
    my $mol =
        defined $n ?
    ...
        )
        : 'n/a'
    ;
    
  3. or download this
    my $mol = <noise> 'fourty two' <noise> 'n/a';
    
  4. or download this
    my $mol =
    
    ...
            ? 'forty two'
    
            : '';
    
  5. or download this
    my $mol =  defined $n ? ( $n == 42 ? 'fourty two' : '' ) : 'n/a';
    #          ^^^^^^^^^^                                      ^^^^^
    
  6. or download this
    my $mol = ! defined $n ? 'n/a/' : $n == 42 ? 'fourty two' : '';
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (13)
As of 2014-09-22 18:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (198 votes), past polls