I've not found returning references to involve significantly more coding (but then, I find hashes of arrays and hashes of hashes to be Perl's most useful data structures). As moritz said, references do eliminate the need for copying, which could be wasteful of time and space. Unless I knew an array was going to be small (less than a dozen or so elements), I'd probably return a reference. Since I come from the Fortran world (where everything is passed by reference), I don't find the "pass-by-reference" issue to be a real one.
emc
Information about American English usage here and here.
Floating point issues? Read this before posting: http://docs.sun.com/source/806-3568/ncg_goldberg.html
In reply to Re: Best way to return array or hash?
by swampyankee
in thread Best way to return array or hash?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |