... sub flippout { my %h = @_; my @f; while( my ($k,$v) = each %h ) { while( my ($vk,$vv) = each %$v) { push @f, [$vv, $k, $vk] } } return @f } ...