Cool. Accessing $a[$i] isn't enough to vivify (otherwise your defined test would do it).
So we don't actually need the defined test in your map and can get away with:
# This *doesn't* vivify $a[3,4,5] @b = map { $a[$_] } (0..5);
Thanks.
In reply to Re^2: Avoiding vivification with array slice
by jbert
in thread Avoiding vivification with array slice
by jbert
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |