in reply to How to tweak an AoH?

How are keys unecessary to a hash??? Maybe you want something like:
... $sth->execute(...) or die(...); my %field_idx = do { my $i = 0; map { $_ => $i++ } @{$sth->{NAMES}} }; my $row; while ($row = $sth->fetch()) { print($row->[$field_idx{'userid' }], $/); print($row->[$field_idx{'password'}], $/); } ...

Replies are listed 'Best First'.
Re^2: How to tweak an AoH?
by neniro (Priest) on Nov 17, 2004 at 18:18 UTC
    How are keys unecessary to a hash???

    Of course they are necessary to a normal hash - but for an AoH it isn't necessary to have complete hashes cause the keys for each row are always the same.