PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Louis Proyect <lnp3 at columbia dot edu>
Subject: testing values in returned rows
Date: Feb 9 2000 9:53PM

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";}
  }