Singing Banzo wrote:
>
> I think this is a very basic warning, but I coudn't find the way to avoid it
> (tried google, faq, and archive):
>
> Use of uninitialized value in pattern match (m//) at poComen.cgi line 138.
>
> line 138:
> if ($q->param('template') =~ /^[1234]$/) { # trying to find out if the
> value of a form parameter is a digit between 1 and 4
The warning means that the value of $q->param('template') is undef.
> This only happens with "use strict".
>
> How can I get rid of it?
if ( defined $q->param('template') and $q->param('template') =~ /^[1234]$/ ) {
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]