in reply to Return a Reference or Array?

I don't know what your array elements are, but for example one million strings of a few characters length each can eat up quite some memory; I'd rather go with the references.

There's some convenience you can provide: You can return an array reference in scalar context, and the array itself in list context:

return wantarray ? @array : \@array;

The the caller can decide which version she wants.