in reply to Re^3: Array/List Strangeness (why)
in thread Array/List Strangeness
Sorry, multi-value slices require more complex syntax: @{[1,2,3]}[8,1,9]. The -> only works when you just want one value back. The @{ } form isn't actually much more verbose, but it is rather uglier. There was a patch to allow [...]->@[...] syntax (and I believe there is even a fork of Perl5 that includes such a patch) but it never got applied to official Perl 5 (I don't think I ever saw a good reason given for why it shouldn't be applied, though).
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Array/List Strangeness (why)
by LanX (Saint) on Aug 05, 2009 at 18:29 UTC |