#!/usr/bin/perl use strict; use warnings; use feature qw/say/; my %hoh = ( foo => { value => 'first' }, bar => { value => 'second' }, baz => { value => 'third' }, ); my %h2; $h2{first} = $hoh{baz}; $h2{second} = $hoh{foo}; $h2{third} = $hoh{bar}; for my $elem (sort values %h2) { say "value => " . $elem->{value}; } #### $ perl p.pl value => first value => second value => third