On Friday, Mar 7, 2003, at 10:42 US/Pacific, Tony Bandy wrote: [..]
Just a beginning test page where the end-user submits a name and gets a page back with that name in it. The page works,however, the warning I keep getting is:
"Use of uninitialized value in concatenation (.) or string..."
that error message should also have a line number. that would help point to which specific line is causing the problem. [..]
[..]
Here is a snippet of code that will generate the error messsage above:
#!c:\Perl\Perl5.00402\bin\perl.exe -w
#Set Perl Parameters
#use strict;
#The CGI.pm module will take input from the form and process it for you.
use CGI qw(:standard);
my $name=param("name");
print "<h2>You entered: $name <p>\n";
assuming that the 'uninitialized value' error occurred in the print statement, then clearly what got to you did NOT have a 'name' parameter in the query.
One strategy would be:
my $name = param("name");
$name ||= '';
so that if there was no name parameter then it will 'initialize' $name to an empty string.
Note from the perldoc CGI as of 2.63 it should have returned an 'empty string' if the query had been of the form "name1=&name2=" or "name1&name2"
so you can check for the version with say
[jeeves: 90:] perl -MCGI -e 'print $CGI::VERSION' 2.56[jeeves: 91:]
ciao drieux
---
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]