You're missing a my before the @values and @keys arrays.Update: Not any more.
And while I'm nitpicking :-), personally I find it clearer to use a hash slice instead of map:
YMMV of course.@values = @hash { @interesting_keys }; @keys = @reversed_hash { @interesting_values };
In reply to Re^2: Returning value or key from a hash
by tirwhan
in thread Returning value or key from a hash
by Gavin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |