Re: Indexing through Array of Arrays

2001-12-25 Thread Jonathan E. Paton
Have you tried: foreach (@$Z) { print join ", ", @$_; print "\n"; } Although this might be more useful: foreach (@$Z) { foreach(@$_) { print "$_, "; } print "\n"; } Looks easy eh? :) The DBI does have other ways of returning data, which sometimes is more effective/easier. De

Re: Indexing through Array of Arrays

2001-12-25 Thread Andrea Holstein
Kurt wrote: > > I'm working with a database interface (DBI) that returns information > by returning a reference ($Z) to an array of arrays. > > ... > > When I write $Z->[2][3] I get the expected -81.3439. > > Now the questions: > > If I want to iterate over each of these elements, to print ou

Indexing through Array of Arrays

2001-12-25 Thread kurt
I'm working with a database interface (DBI) that returns information by returning a reference ($Z) to an array of arrays. When I run the program in the debugger, and ask for $Z, I get: 0 ARRAY(0x20d5e8) 0 ARRAY(0x41acfc) 0 26412 1 'ORLANDO' 2 'WV' 3 '-80.51