in reply to
Re: multidimensional array's
in thread multidimensional array's
A little known "feature" of fetchall_arrayref is that it will return an array of hashes if you supply it a hash, and if that hash is empty, it will return all the fields.
my @allrows = @{ $sth->fetchrow_arrayref({}) }; # Expand ref, to simpl
+ify access
YMMV, but I always find it easier to look at $row{language} than $row[2]. I'm sure there's a mild performance hit, but as long as it's not incredibly slow I'd opt for clarity.
A Monk aims to give answers to those who have none, and to learn from those who know more.