in reply to Why a reference, not a hash/array?

It's cheaper to return a ref to a structure than to return a copy of the structure. Database operations often return large structures and the cost of copying them could impose a significant cost of doing business.

You can use a reference pretty much anywhere you might otherwise use a structure directly. You may find References quick reference helps.


DWIM is Perl's answer to Gödel