dmitri has asked for the wisdom of the Perl Monks concerning the following question:
sub x { return {qw(a b c d)}; } print @{%{x()}}->{"a","b"};
While this does:
How would I get a slice?sub x { return {qw(a b c d)}; } print %{x()}->{"a"};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to get a slice of hash ref that a sub returns.
by TheHobbit (Pilgrim) on Apr 18, 2002 at 22:21 UTC | |
|
Re: How to get a slice of hash ref that a sub returns.
by dmitri (Priest) on Apr 18, 2002 at 21:48 UTC | |
by tye (Sage) on Apr 18, 2002 at 21:56 UTC |