----- Original Message -----
From: "Sterin, Ilya" <[EMAIL PROTECTED]>
>> Well, that's not true. This is not C/C++ and an undefined value will
print
>> nothing with no error.
From: "Caraway, Michael" <[EMAIL PROTECTED]>
> I am running Oracle 8.0.5, Perl 5.005_03, DBI 1.14, and DBD Oracle 1.06 on
> Red Hat Linux 6.2 and that is how it works here. If you have a different
> setup, it may work differently.
Ilya is correct. Attempting to print an undefined value will never give you
an error, period. It doesn't matter what your setup is.
Try running the following code:
use strict;
my $test1 = undef;
my $test2 = 5;
print $test1;
print $test2;
Possibly you are confusing the warnings emitted when Perl is run with the
"-w" flag with errors. If you put "use diagnostics" before your code, it
will help you understand the output you are getting.
If you are trying to print html, the warning emittied could possibly mess up
your html, rendering it invalid. This is one of the many reasons why you
should not turn warnings on in production code.
> I have many Perl DBI scripts running against my database, and in every
> instance where a null is returned, the Perl variable is undef.
That part is correct.
> My 'fix' is:
> unless (defined $var) { $var = "" }
There is nothing to fix.
-Mike