|
|
sybperl-l Archive
Up Prev Next
From: Michael Sattler <msattler at jungle dot com>
Subject: Help! Alternate syntax for a foreach() loop
Date: Mar 5 1996 9:55PM
Michael's Sybperl examples provide something like this:
>$ref = $d->sql("select * from foobar_table");
>
>foreach $line (@$ref) { print "@$line\n"; }
Well, what if I want to reference the nth element instead of iterating
through all the results? I forget the syntax.
Swift kicks gratefully accepted.
-----------------------------------------------------------------------+
Michael Sattler, Digital Jungle |
San Francisco, California, USA |
|
I wrote "Internet TV with CU-SeeMe" for you to enjoy; ISBN 1575210061. |
|
Wired via Metricom Ricochet wireless modems, I'm in the People's Cafe. |
Help wire California's schools on 9 Mar 96 -- http://www.netday96.com/ |
|