See subsection 2 of perlref:Making references where it says:
As a special case, \(@foo) returns a list of references to the contents of @foo, not a reference to @foo itself
Just for fun try:
print "$_" for \( %{{a =>1}}, @{[1..3]}, "fred" );; HASH(0x2251b8) ARRAY(0x194a9f4) SCALAR(0x194aaa8)
In reply to Re: referencing slices - love that DWIM
by BrowserUk
in thread referencing slices - love that DWIM
by GrandFather
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |