This also works.For some meaning of "works", in the same sense that you can add "sleep 1" in various places in your program and it still "works", albeit slower.
There's no point in constructing an entire full-fledged array, then take a reference to it, then dereference that reference to get a particular element, then garbage collect the full array, just to get one element of it. It's a lot of extra work.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to Re^2: array element return syntax
by merlyn
in thread array element return syntax
by Lyndley
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |