Syntactic Confectionery Delight | |
PerlMonks |
Re: Get reference to newly-created arrayby ikegami (Patriarch) |
on Oct 22, 2007 at 16:33 UTC ( [id://646487]=note: print w/replies, xml ) | Need Help?? |
[] and do { my @array; \@array }, will both create an array and return a reference to it, but the array will be anonymous. No good. You could use prototype trickery to do what you want.
By the way, it's =s when you pass a reference to an array, and =s@ when you pass a reference to a scalar. That opens up another possibility:
In Section
Seekers of Perl Wisdom
|
|