in reply to Best way to return array or hash?

Returning an array directly copies it, so if your arrays are large or you're doing it often, use references instead.