Think about Loose Coupling | |
PerlMonks |
Re: Sorting Data::Dumper Outputby tachyon (Chancellor) |
on Nov 26, 2001 at 20:50 UTC ( [id://127576]=note: print w/replies, xml ) | Need Help?? |
Sice Data::Dumper uses XS (ie is written in C) hacking the source to get what you want is less than trivial. I wanted this myself a while ago. Here is a hack that reformats the standard Data::Dumper output and sorts on keys - it produces the output you expect, just sorted: UpdateMade sub recursive and added some options for numeric, alpha or auto choice sort and optional array sorting. It now sorts all elements to whatever depth UpdateCode has been moved to snippets Sort Data::Dumper Output and patched to correctly handle AoH and AoA constructs cheers tachyon s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In Section
Seekers of Perl Wisdom
|
|