Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://207497]
Discipulus still has problem with 'until' beyond simplest cases
[choroba]: ;-)
[Discipulus]: and larry studied natural languages too
[choroba]: Czechs have problems with unless
[Lady_Aleena]: Are you all sick of me discussing my reorganization?
[Discipulus]: Untillian Headache or about the semantic of until
[Discipulus]: Lady_Aleena use Great::Flood really, start some little project with new eyes (and a DB)

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2017-05-27 20:25 GMT
Find Nodes?
    Voting Booth?