in reply to Re: Using Data::Dumpers Sortkeys subroutine
in thread Using Data::Dumpers Sortkeys subroutine
What would be a more robust way of solving this?
I think natural sort - as Corion suggested - would fit the bill quite well:
use Data::Dumper; use Sort::Naturally; $Data::Dumper::Sortkeys = sub { my ($hash) = @_; return [ nsort( keys %$hash ) ]; };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Using Data::Dumpers Sortkeys subroutine
by nysus (Parson) on Nov 27, 2008 at 17:22 UTC |