Am Sat, 23 Aug 2003 09:48:05 +0000 schrieb B. Fongo:
> foreach (@table_data)
> {
>
> print qq(<td bgcolor='#d0d0d0'>$_</td>); # Here is line 42
> }
as Frank already pointed out, your trouble is the uninitialized $_ value
you have in line 42 (which is exactly what the warning tells you, BTW).
the reason for this is very probably that @table_data contains items
that have not been initialized (=> they have no value, not even an
empty value assigned to them). @table_data is filled from
database, so _check your database_. I bet you will find "null" values in
here.
if you don't want to output anything if the database delivers such a null
value simply replace your line 42 with
-----CUT------
print qq(<td bgcolor='#d0d0d0'>$_</td>) if $_;
-----CUT------
if you want to output an empty line for null values, then do as Frank
suggested:
-----CUT------
my $val=$_||'NULL'; print qq(<td DEFANGED_bgcolor="0#d0d0d0">$val</td>);
-----CUT------
and no, this has definitively absolute nothing to do with mod_perl, thats
just expected and normal perl behaviour.
happy hacking
udo
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html