Maybe clearer: [@a] creates the ref to a copy (and copying is expensive) while \@a is the ref to the original array (no costs!).
Cheers Rolf
( addicted to the Perl Programming Language)
In reply to Re^2: Why doesn't perl optimize this?
by LanX
in thread Why doesn't perl optimize this?
by nbtrap
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |