in reply to Re^6: Best way to send records to the browser?
in thread Best way to send records to the browser?
You probably want
$hash{$record} = {uid => $rray[0], fname => $rray[1], lname => $rray[2 +]};
instead of
%hash = ($record => {uid => $rray[0], fname => $rray[1], lname => $rra +y[2]});
because the latter initializes the hash anew every time, so the old entries are lost.
Also, in this particular case, another problem seems to be that in the first loop you're creating hash entries with keys as "record_$i", while in the second loop you're using plain numbers ($i). Also, you probably mistyped $hash2{$i} when you meant $hash{$i}.
More generally, there are two things that will likely save you lots of debugging time:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Best way to send records to the browser?
by Perobl (Beadle) on Jun 26, 2010 at 21:52 UTC |