Is it possible to return a hash's values as an array reference?
\@{values %hash}
I looked over the perlref document, but didn't see anything relating to this (or if I did, I wasn't able to relate it to my question).
Is it possible to return a hash's values as an array reference?
\@{values %hash}
I looked over the perlref document, but didn't see anything relating to this (or if I did, I wasn't able to relate it to my question).
I think you're looking for this:
my $values_ref = [ values %hash ];