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: DBLib code question
Date: Jan 6 2010 4:25PM

I have to convert a script to CTLib that was written by someone else
whose syntax differs sharply from my own. He wrote:

         $dbh->dbcmd ("exec Stored_Procedure);           
         $dbh->dbsqlexec;
         $status = $dbh->dbresults;
         print("STATUS1 = $status\n");          
    
         while(@data= $dbh->dbnextrow)   
         {                                                          
                          
         print("BEFORE: data[98]= @data[98]\n");   
         @dbresult = @data;     
            
         } 
        ###### At this point @data does not exist anymore,
###############
        ############ because of closing connection to Sybase
############ 
        
        ##### Check date  from DB (Status = "T") ##############
        ##### If date does not exist write row ################ 
        ##### otherwise - main process ########################
         if (@dbresult[98] eq undef)
         {                       
              print("After:dbresult[98]= @dbresult[98]\n");       
                                             
        
My question is about "if (@dbresult[98] eq undef)". What is a test for
"undef" mean? Does it mean that the stored procedure returned no rows?