more useful options | |
PerlMonks |
Re: How do I take a slice of a hash reference?by tianping (Initiate) |
on Jun 02, 2011 at 08:40 UTC ( [id://907767]=note: print w/replies, xml ) | Need Help?? |
japhy has answered the question, but it's also worth pointing out the solution to the syntax error in your original code. The parentheses alter the priority; so just remove them:
More generally, put curly braces around the hash ref expression:
In Section
Seekers of Perl Wisdom
|
|