|
|
sybperl-l Archive
Up Prev Next
From: "Sheree Hemphill" <sah18 at po dot cwru dot edu>
Subject: RE: basic sybperl/cgi question
Date: Jun 3 1999 3:32PM
> I would bet that the problem is in the SYBASE environment variable
> isn't set correctly.
That doesn't seem to be the problem.
** This code DOES work: **
** (this is a perl program with .pl extension run at the command prompt) **
#!/usr/local/bin/perl
chdir("/usr/people/sah18/myperl/snp/genbank");
@acresults = glob("*.txt");
$length = @acresults;
print "the length of acresults is $length\n";
use Sybase::CTlib;
$dbh = new Sybase::CTlib 'user', 'password', 'server';
$dbh->ct_sql("use dbname");
** This code does NOT work: **
** This program is name with .cgi extension and is run within a browser
window: **
#!/usr/local/bin/perl
BEGIN {
$ENV{SYBASE} = '/usr/sybase';
}
use CGI qw/:standard/;
use Sybase::CTlib;
$dbh = new Sybase::CTlib 'user', 'password', 'server';
$dbh->ct_sql("use dbname");
Once again, any ideas/suggestions would be greatly appreciated.
Sheree
|