use Data::Dumper; $Data::Dumper::Sortkeys = 1; print Dumper \%hash;