The fragment you have shown will not compile. The following will compile:
(keys %$hash_ref)[-1]... and will return the "last" key of hash %$hash_ref. But that would seem somewhat meaningless, as the keys of a hash do not have any specific order. Any apparent order of the keys may change when the elements of the hash are changed, or a different Perl is used.
In reply to Re: what is keys %$hash_ref [-1]
by philipbailey
in thread what is keys %$hash_ref [-1]
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |