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.
In reply to Re: Why a reference, not a hash/array?
by GrandFather
in thread Why a reference, not a hash/array?
by Cody Pendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |