Up Prev Next
From: Michael Peppler <mpeppler at mbay dot net>
Subject: Re: [Fwd: sybperl/perl4 vs perl5.03]
Date: Dec 19 1997 5:29PM
I scan the newsgroups (using DejaNews) but I hadn't seen your message.
You may have uncoverred a bug in the Sybperl 1.xxx emulation code,
which I'll have to look into - in theory the Sybase::Sybperl
module should behave nearly exactly the same way as the perl 4.xxx
In the meantime, could you let me know which version of sybperl you
have on your perl 5.003 installation - you can run
perl -M'Sybase::DBlib (999)'
(note the quotes) to get the version:
kiruna (8:48am):7 > perl -M'Sybase::DBlib (999)'
Sybase::DBlib 999 required--this is only version 2.08 at - line 0
BEGIN failed--compilation aborted.
kiruna (9:22am):8 >
which tells me I have 2.08 installed here.
You can also run this command:
perl -MSybase::DBlib -e 'print "$Sybase::DBlib::Version\n";'
The default behaviour for reporting NULLs in recent versions of
sybperl is to set the values to the perl value 'undef'. This can
then be tested with the defined() operator.
So you could, as a workaround, change
if($val eq 'NULL')
Carla Lamotte wrote:
> I posted this question on sybase and perl user groups but wanted to send
> it direct to you. I would appreciate your response.
> thank you
> carla lamotte
> Subject: sybperl/perl4 vs perl5.03
> Date: Fri, 19 Dec 1997 09:01:35 -0800
> From: Carla Lamotte
> Organization: @Home Network
> Newsgroups: comp.databases.sybase
> I recently developed an application on sybperl/perl4 and when tried to
> run that sybperl script on perl5.03 (which includes sybperl) I got
> errors because when I select columns from a table (using perl5) and then
> check to see if the value is NULL it does not put the value NULL there
> but in perl4 if I select a row into an array and the column is NULL then
> it places NULL there. In perl5 I cannot differentiate between NULL and
> empty string. Is anyone familiar with this problem and do you know how
> to get around it?
> Thank you
Michael Peppler -||- Data Migrations Inc.
firstname.lastname@example.org -||- http://www.mbay.net/~mpeppler