I need some help with this reference.
I'm using -
while (($count,$regions,$region_id) = $sth->fetchrow_array) {
push(@lol, [$regions,$count,$region_id]); }
and accessing each element with -
for $i ( 0 .. $#lol ) {
print "$lol[$i][0] $lol[$i][1] $lol[$i][2]"; }
which works fine.
What I need to do is to reference the @lol and dereference within the loop, but I can't get this to work.
while (($count,$regions,$region_id) = $sth->fetchrow_array) {
push(@lol, [ [$regions,$count,$region_id] ]); }
for $i ( 0 .. $#lol ) {
print "$lol->[$i][0] $lol->[$i][1] $lol->[$i][2]"; }
I've read all the docs but obviously missed the point.
Bob
http://totallyfreeads.com
I'm using -
while (($count,$regions,$region_id) = $sth->fetchrow_array) {
push(@lol, [$regions,$count,$region_id]); }
and accessing each element with -
for $i ( 0 .. $#lol ) {
print "$lol[$i][0] $lol[$i][1] $lol[$i][2]"; }
which works fine.
What I need to do is to reference the @lol and dereference within the loop, but I can't get this to work.
while (($count,$regions,$region_id) = $sth->fetchrow_array) {
push(@lol, [ [$regions,$count,$region_id] ]); }
for $i ( 0 .. $#lol ) {
print "$lol->[$i][0] $lol->[$i][1] $lol->[$i][2]"; }
I've read all the docs but obviously missed the point.
Bob
http://totallyfreeads.com