in reply to Re: Saving array reference
in thread Saving array reference

Good suggestions. Just two minor points: first, in fairness to the DBI developers, the fact that fetchrow_arrayref reuses the same reference isn't just "internal", but is actually documented in the DBI docs:
Note that the same array reference is returned for each fetch, so don’t store the reference and then use it after a later fetch.
Second, the 'limit n' syntax isn't used across all databases, though for anyone on MySQL that's certainly a good suggestion. But Oracle, for example, doesn't have it.