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: Re: follow-up question
Date: Feb 11 2000 9:20PM

After experimenting and reading through Wall's Perl5 book, I came up with a
solution to the problem I posed yesterday:

#!/usr/local/bin/perl
use Sybase::CTlib;
 
$dbh = Sybase::CTlib->ct_connect('xxx', 'yyy');
 
$convert = "select getdate()";
@res = $dbh->ct_sql($convert);

# Date can be tested correctly after being subjected to a a "dereferencing 
# mechanism" as Wall puts it.

$date = $res[0][0];  
if ($date =~ /Feb/)
  {print $date;}