in reply to Re: Returning value or key from a hash
in thread Returning value or key from a hash
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 };
|
|---|