Ed Loehrwrote:
> I believe DBI/DBD does this for you:
>
> while ($row_href = $sth->fetchrow_hashref)
> {
> push( @taghash, $row_href);
> }
Don't do that! Each hashref in that array will point to the same hash in some
future version of the DBI. You should do this instead:
while($row=$sth->fetchrow_hashref){
push @taghash,{%$row};
}
Or, better yet:
$taghash=$sth->fetchall_arrayref({});
to get everything all in one go.
--
Peter Haworth pmh@edison.ioppublishing.com
"Master, does Emacs have the Buddha nature?" the novice asked.
The Chief Priest had been in the temple for many years and could be
relied upon to know these things. He thought for several minutes before
replying, "I don't see why not. It's got bloody well everything else."