in reply to CGI Programming Style With Empty Params

First, I hate typing $q->param..., so I follow the style that Lincoln Stein himself uses of bringing in the subroutines. My time typing and reading is worth more than the CPU I'll ever save.

So, having said that, I find I do this a lot:

if (defined(my $foo = param('foo')) { .. do something with $foo } else { .. foo isn't present, now what? }
And that seems to be a fairly reusable pattern.

-- Randal L. Schwartz, Perl hacker