|
|
|
Your skill will accomplish what the force of many cannot |
|
| PerlMonks |
Re: Treating sub output as a hashby AnomalousMonk (Prior) |
| on Jan 26, 2012 at 17:26 UTC ( #950174=note: print w/ replies, xml ) | Need Help?? |
|
With 5.14, one can use keys, values and each directly on an unblessed hash (or array) reference or an expression that evaluates as such (although this is flagged as "highly experimental"). I don't have 5.14 and so cannot provide a working example, but I think it should go something like this:
Update: Example tested OK with 5.14 per chromatic (with thanks!).
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||