On Wednesday, June 26, 2002, at 06:11 , [EMAIL PROTECTED] wrote:
[..]
>>> Use of uninitialized value in string eq at index.cgi line 14.
[..]
>>> Here is what (I believe) it is talking about:
>>> my $c = param('c');
>>> my $content = "c";
>>>
>>> if ($c eq "h") {
let us assume that the above is 'line 14'
wouldn't it follow that the problem is that $c is
not a defined value...
eg:
1 #!/usr/bin/perl -w
2 use strict;
3
4 # #FILENAME# - is for
5
6 use CGI qw/ :standard /;
7 $CGI::DISABLE_UPLOADS = 1;
8 $CGI::POST_MAX = 512 * 1024;
9
10 print "Content-type: text/html\n\n";
11
12 my $c = param('c');
13
14 print "\$c is used as $c\n";
Use of uninitialized value in concatenation (.) at /Users/drieux/drieuxWeb/
drieux/pbl/cgi/lostParam.txt line 14.
$c is used as
[jeeves:~] drieux%
Note: guarding line 14 with
print "\$c is used as $c\n" if $in{$c};
as felix suggested will still get you the warning.
Hence it would seem that what you will want to do is
a) my $c = param('c');
$c ||= '';
b) check if there is a param('c') by some other means.
ciao
drieux
---
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]