Than perhaps you need to also start prototyping you functions, using alloc,
malloc, etc... to expand the variable, other fun stuff. Perl is written in
C, but is dynamically uncomparable.
Ilya Sterin
-----Original Message-----
From: Caraway, Michael
To: 'Michael A Mayo'; [EMAIL PROTECTED]
Cc: DiGiovanni, Jim; DiGiovanni, Jim
Sent: 05/24/2001 8:33 AM
Subject: RE: Newbie Q. : fetchrow_array.
I only stated what I have seen and experienced. You can disagree, and
that
is ok. I made a suggestion for something to check, if it fixed the
problem
or not, it became one less thing that needed to be checked. I use
values
returned from the database for many things other than printing, and have
had
interesting challenges to overcome. By the way, Perl is 'C'. Check the
source code.
Michael
-----Original Message-----
From: Michael A Mayo [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 24, 2001 10:24 AM
To: [EMAIL PROTECTED]
Cc: DiGiovanni, Jim
Subject: Re: Newbie Q. : fetchrow_array.
----- 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
Confidentiality Note: This e-mail, and any attachment to it, contains
privileged and confidential information intended only for the use of the
individual(s) or entity named on the e-mail. If the reader of this
e-mail
is not the intended recipient, or the employee or agent responsible for
delivering it to the intended recipient, you are hereby notified that
reading this e-mail is strictly prohibited. If you have received this
e-mail in error, please immediately return it to the sender and delete
it
from your system.
This e-mail and any attachment(s) are believed to be free from virus.
However it is the responsibility of the recipient to ensure that they
are
virus free. We do not accept any liability for any loss or damage
arising
in any way from the receipt, opening or use of this e-mail and any
attachment(s). Thank You.