I don't really think of mutable arguments like that as "output parameters". "I/O parameters" maybe. I the sense that C like languages use output parameters where the sole job of the parameter is to return information from the function I don't see a need for output parameters in Perl, although passing references in the parameter list could be used that way.
The run time and memory cost of returning a reference to a large structure, or a list of references to large structures has essentially the same overhead on Perl as passing references back as parameters. Since returning a list of stuff is natural in Perl returning a list of references makes for easier to understand code than working with output parameters.
In reply to Re^3: Pointers and References
by GrandFather
in thread Pointers and References
by Leudwinus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |