Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: "Correct" program style questions

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

in reply to "Correct" program style questions

Also, the following popular construct can generate a warning if the parameter is undefined:
my ($action) = param('action') =~ /^([[:alpha:]]+)$/;
As I don't like spurious warnings in my error log, it seems cleaner this way.

Why would you consider those warnings spurious? If they were a result of an incorrect parameter name in a form, they could help with debugging. If they are the result of someone purposefully trying to submit incorrect parameters it might be interesting to know that...

The code looks fine, by the way. I don't use POSIX character classes very often myself but I don't have any problem reading them.

"My two cents aren't worth a dime.";

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2016-10-24 18:38 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (309 votes). Check out past polls.