At 09:01 AM 11/04/2002, [EMAIL PROTECTED] wrote: >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).
That all makes a lot of sense, but I think I like Nikola's idea to use "no warnings 'uninitialized'", at the top of the print block. It's not $drvname that is empty, it's the array @columns that have null values, not all fields in the table are required. Thanks for the info, that's very useful. Scott. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]