A somewhat cleaner way of doing what you accomplish:
my $param = $cgi->param('foo') || ''; if ($param) { #... }
Or, if you always untaint your variables:
my $_param = $cgi->param('foo') || ''; my ($param) = $_param =~ /^($some_regex)$/;
Cheers,
Ovid
New address of my CGI Course.
Silence is Evil (feel free to copy and distribute widely - note copyright text)
In reply to Re: Re: Detecting a post via cgi
by Ovid
in thread Detecting a post via cgi
by jcpunk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |