Re: Use of uninitialized valued in concatenation....
On Fri, 2003-08-22 at 17:23, B. Fongo wrote: > I have a file (output_tab.pm) that I use to generate tables > dynamically. Even though it serves its purpose, it goes on generating > this error: > > “Script_name.pl: Use of uninitialized value in concatenation (.) or > string at output_tab.pm line 42”. This is a standard perl error message. It is not related to mod_perl. You can look in the perldiag man page for a more complete explanation. - Perrin -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Use of uninitialized valued in concatenation....
B. Fongo wrote: Hello I have a file (output_tab.pm) that I use to generate tables dynamically. Even though it serves its purpose, it goes on generating this error: “Script_name.pl: Use of uninitialized value in concatenation (.) or string at output_tab.pm line 42”. At line 42 of your output_tab.pm module, make sure all variables being used in that line have a value before being used. For example... $null_var ||= ''; The real problem may be that your logic to assign the variable in the first place doesn't work, but you can make the error message go away with the mentioned trick. For more info on this, check out the "perldoc perldiag" page and look up the error message for a better explanation. Regards, Josh Josh Chamas, Founder phone:925-552-0128 Chamas Enterprises Inc.http://www.chamas.com NodeWorks Link Checker http://www.nodeworks.com -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Use of uninitialized valued in concatenation....
B. Fongo wrote: > Script_name.pl: Use of uninitialized value in concatenation (.) or > string at output_tab.pm line 42. Perrin replied: > This is a standard perl error message. It is not related to mod_perl. > You can look in the perldiag man page for a more complete explanation. B. Fongo wrote: > It is not a standard perl error message. I went through mod_perl doc at > http://perl.apache.org/docs/general/perl_reference/perl_reference.html#T > racing_Warnings_Reports I am sorry, but it *is* a standard Perl error message. It means exactly what it says: you concatenated or stringify an undefined value. Looking in your code (of which I do not know exactly where it starts, so line 42 is a bit of a guess) it can be either print qq($_); or print qq( ); In the latter case, please check $columnspan to be sure it is given a defined value. For the first: you go through a list of tablerow values, can it be that a value is NULL? This would be translated into undef and hence raise this warning. Try to replace with my $val=$_||'NULL'; print qq($val); --Frank -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html