good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: 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 reply to Re: Sorting Data::Dumper Output
by tachyon
|
|