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.
In reply to Re: Returning references
by mr.nick
in thread Returning references
by radagast
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |