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