in reply to Returning references

Or just start using it as $ref without moving it to another variable:

print join "\n",@$ref; # treat it as an array print $ref->[0]; # grab the first element for my $l (@$ref) { print $l; } # loop over it and do something

You don't need to move it to another variable for it to be useful. You just need to know the syntax to dereference it on the fly.