Tricky! (Because it's silly. You should be using a more convenient data structure. Anyway...)
First, let's ignore the irrelevant. We want to sort the elements of an array, so let's locate that array.
for my $array (values(%$out)) { ... }
Along the same lines, let's create a "view" that contains only the elements we want to sort. The following gives the indexes of the elements we want to sort:
my @idxs = grep { ref($array->[$_]) } 0..$#$array;
So the following is the "view" (array slice) we want to sort:
@{$array}[ @idxs ]
Each of these elements is a reference to a hash. We'll want to naturally sort the only key of the referenced hash. The key can be obtained using the following:
( keys(%$_) )[0]
Now, we just need to assemble the blocks.
use Sort::Key::Natural qw( natkeysort );
for my $array (values(%$out)) {
my @idxs = grep { ref($array->[$_]) } 0..$#$array;
@{$array}[ @idxs ] =
natkeysort { (keys(%$_))[0] }
@{$array}[ @idxs ];
}