Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Re: Re: "Correct" program style questions

by Anonymous Monk
on Oct 23, 2002 at 19:08 UTC ( #207497=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use locale;
    
    my $color = param('color') =~ /^\w+$/ ?
                param('color') :
                "default color";
    
  2. or download this
    my $color = "default color";
    $color = param('color') if param('color') =~ /^\w+$/;
    
  3. or download this
    use locale;
    
    ...
    }
    
    my $color = is_alpha(param('color')) || "default value";
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2014-07-28 09:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (193 votes), past polls