sub x { return {qw(a b c d)}; } print @{%{x()}}{"a","c"};
The trick was to kill the arrow (even though I am not yet sure why).
In reply to Re: How to get a slice of hash ref that a sub returns.
by dmitri
in thread How to get a slice of hash ref that a sub returns.
by dmitri
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |