in reply to Re^2: Sorting the hash
in thread Sorting the hash

That line should be:

print Dumper(\%x);

Instead of:

print Dumper($x);

Since you could have a hash, %x, and a completely unrelated scalar, $x, in the same scope.