Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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

by sauoq (Abbot)
on Oct 23, 2002 at 20:38 UTC ( #207525=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # Cargo-cultish version with a temp variable.
    my $_name  = param('name') || '';
    my ($name) = $_name =~ /^([[:alpha:]]+)$/;
    
  2. or download this
    # BrowserUk's cargo-cultish only version.
    my ($name) = (param('name') || '') =~ /^([[:alpha:]]+)$/;
    
  3. or download this
    # My preferred version.
    my ($name) = param('name') =~ /^([[:alpha:]]+)$/;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2016-10-01 19:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?






    Results (6 votes). Check out past polls.