Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "WORENKLEIN, David, GCM" <David dot Worenklein at gcm dot com>
Subject: RE: testing values in returned rows
Date: Feb 9 2000 10:09PM

@$row is an array.  You probably don't want to use an array on the left
side of a =~.

> -----Original Message-----
> From: Louis Proyect []
> Sent: Wednesday, February 09, 2000 4:53 PM
> To: SybPerl Discussion List
> Subject: testing values in returned rows
> In the example below, @$row is never printed, but if I omit 
> the if-test it
> does print "Feb 9, 2000". I have a feeling that this has 
> something to do
> with the complexities of Object Perl that I have not yet 
> mastered. In the
> meantime, any answers would be greatly appreciated.
> ===
> #!/usr/local/bin/perl
> use Sybase::CTlib;
> $dbh = Sybase::CTlib->ct_connect('xxx', 'yyy');
> @res = $dbh->ct_sql("select getdate()");
> foreach $row (@res)
>   {if (@$row =~ /Feb/)
>      {print "@$row\n";}
>   }
This e-mail is intended only for the addressee named above.
As this e-mail may contain confidential or privileged information,
if you are not the named addressee, you are not authorised to
retain, read, copy or disseminate this message or any part of it.