Subject: | keys() and values() return an array ref? |
$ perl -wle 'use autobox::Core; my %h = (a => 1, b => 2); print keys
%h; print %h->keys'
ab
ARRAY(0x804a90)
This contradicts an example in the docs.
my $hashref = { foo => 10, bar => 20, baz => 30, qux => 40 };
print "hash keys: ", join ' ', $hashref->keys(), "\n";
I suppose it returns an array ref to allow chaining?
%hash->keys->sort