gwhite has asked for the wisdom of the Perl Monks concerning the following question:
I have a hash of data, hashes and arrays. Is it possible to get Data::Dumper to give me output sorted on the key value of the hash? What would the syntax be?
The hash looks something like(untested) but a whole lot longer:
%hash = ( x=> 'line 1', z=> [ 1, 2, 4], y=> { file=> 'test.txt', length=> 200, type => 'ASCII' }, a=> 'line 2' );
and I would like Data::Dumper "style" output sorted on the hash keys.
g_White
Back to
Seekers of Perl Wisdom