On 5/3/07, sivasakthi <[EMAIL PROTECTED]> wrote:
I have used your suggestions, but it shows the following error,
Use of uninitialized value in string eq at aaa.cgi line 26, <fp> line 1
line 1 contains: #! /usr/bin/perl
..................
line 26 contains: if($y eq "somestring")
{
some statements
}
snip
Where you expecting $y to have a value? If so, then there is a
logical bug somewhere in the preceding 24 lines. If you didn't expect
$y to have a value then this is normal. There are a couple ways of
making the warning go away (note: you should only make the warnings go
away if $y is expected to sometimes have no value).
#probably the best way
my $y = param('sss');
$y = '' unless defined $y;
#a less verbose way that only works if "0" is not a valid input
my $y = param('sss') || '';
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/