dapiaoen -
Joined: 28 Dec 2006 Posts: 12
|
Posted: Mon Feb 05, 2007 4:53 pm Post subject: perl uninitialized value in concatenation |
|
|
I'm loading a hash with data from a SQL query. I'm compiling with use strict a the flag, -w and I get no errors.
However, the abyss CGI.log is full of:
Use of uninitialized value in concatenation (.) or string at AdmLib.pm line 64.
Use of uninitialized value in concatenation (.) or string at AdmLib.pm line 70.
Use of uninitialized value in concatenation (.) or string at AdmLib.pm line 71.
Use of uninitialized value in concatenation (.) or string at AdmLib.pm line 56.
Use of uninitialized value in concatenation (.) or string at AdmLib.pm line 64.
Use of uninitialized value in concatenation (.) or string at AdmLib.pm line 70.
Here's the code snippet
my %hshTblData = ();
my @row = [];
# cut....
while (@row = $sth->fetchrow_array()) {
$hshTblData{'tid'} .= "$row[0],";
$hshTblData{'rcd_sid'} .= "$row[1],";
$hshTblData{'rcd_date_time'} .= "$row[2],";
$hshTblData{'tbl_name'} .= "$row[3],";
$hshTblData{'fld_name'} .= "$row[4],";
$hshTblData{'fld_type'} .= "$row[5],";
$hshTblData{'fld_size'} .= "$row[6],";
Also, this code:
my $iIdx = 0;
my $iColCount = 0;
# ....cut....
@arrSglDisplay = split( ',', $hshFormData{'sgl_displayed'});
>>>>> if ( $iColCount == 0 && $arrSglDisplay[ $iIdx] > 0) {
Gets this error:
>>> Use of uninitialized value in numeric gt (>) at AdmInterfaces.pl line 248.
It is obviously a numeric value being compared so why the cgi.log error
Again, I get no compile errors (ActivePerl 5.8.8)
Thanks,
Chris _________________ Chris F |
|