Scott,

You've declared it...
my $drvname;
...but not initialised it(given it a value). So at the moment it has the special value 
'undef' (which is treated as 0 in a numeric context, or '' in a scalar one). Try and 
do much with an undef and you'll get a warning, basically reminding you to do 
something with it. You can selectively turn this warning off, like the other bloke 
suggested, but once you start playing with undefs things can get a bit odd -it's best 
to avoid them, by keeping the warnings on. I think setting it as an empty string will 
do the trick:
my $drvname = '';

Note that an undef is *treated* like an empty string in scalar context -that doesn't 
mean to say that it *is* an empty string. This idea only clicked for me the other day 
when someone suggested I read the perlsyn manpage (the declarations bit especially).

Cheers,

Tristan

You Wrote:
----------

When I put the -w switch on I get this error:
Use of uninitialized value in concatenation (.) at 
/var/www/cgi-bin/ticket.cgi line 71:

on this line:
print "$trd Driver ID:</td><td>$columns[19] -- $drvname</td></tr>";

Can anyone point out my mistake?
It still runs but fills up my error_log
and I do have the variables initialized before the loop:
my $trd = "<tr><td bgcolor=white align=right>";
my $drvname;
my @columns;


--
Scott Taylor
Systems Administrator
DCT Chambers Trucking Ltd.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







_______________________________________________________
sent via the murky.net webmail hegemony

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to