Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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

by tye (Sage)
on Jan 18, 2013 at 17:25 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1014094]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-04-25 06:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found