From: Janek Schleicher <[EMAIL PROTECTED]>
Subject: Re: uninitialised value in pattern match
Date: Tue, 24 Sep 2002 13:10:28 +0200

>                                         ^^^
> There misses a ' quote. 
> (Don't retype code, put & paste instead).
> 
> >    causes:
> >    "Use of inititialized value in pattern match (m//) "
> 
> The parameter seems to be undefined.
> 
> Greetings,
> Janek
> 

Typo in the copy not the original -- I think I misstated my question
-- the error message in the log only occurs when there is no mollusc
parameter ( sometimes there is sometimes there isn't ).  How can I
check for the existance of a mollusc param and if so then untaint it,
if it doesn't exist then no problem.  Without the re match the
following gives no errors at any time

 my $mollusc     = ( param( 'mollusc'  )) || '';

compared with :

( my $mollusc  ) = ( param( 'mollusc'  )  =~  /^(\w+)$/i );

which does.  The script actually works under both circumstances and
with both lines of code.

Cheers

Francesco

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to