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: mpeppler at itf dot ch (Michael Peppler)
Subject: Re: Returned arrays
Date: Feb 2 1996 6:55AM

From: Gerd Knops 
> More specifically, code like
> 
> @tmp=$db->sql("select * from a");
> print "$tmp[0]\n";
> 
> suddenly prints
> 
> ARRAY(0xWhatever)
> 
> Does that ring a bell anywhere?

The behaviour changed in version 2b3.
sql() returns an array of references to arrays:

@tmp = $db->sql("select * from sysusers");
foreach (@tmp) {
    print "@$_\n";
}

Prints:

-16384 16384 16384 edp  
-2 0 0 public 
1 1 0 dbo 
3 3 16384 mpeppler 

Hope this helps!

Michael