in reply to Non-deprecated way to access multi-level hashes

use map() to slice:
 my @realnames = map { $_->{realname} } values %names;
  • Comment on Re: Non-deprecated way to access multi-level hashes

Replies are listed 'Best First'.
Re^2: Non-deprecated way to access multi-level hashes
by linux454 (Pilgrim) on Mar 07, 2006 at 21:33 UTC
    This is the most efficient solution. I wish I could recall exactly where I have read that maps() are more efficient than foreach. Perhaps in Advanced Perl Programming, or not.