in reply to Numeric sorting WITHOUT <=>
my ($min) = keys(%jetsons); my $max = $min; for (keys(%jetsons)) { $max = $_ if $_ > $max; $min = $_ if $_ < $min; } my @sorted; for ($min..$max) { push @sorted, $_ if exists($jetsons{$_}); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Numeric sorting WITHOUT <=>
by Marshall (Canon) on Oct 10, 2012 at 04:42 UTC | |
by AnomalousMonk (Archbishop) on Oct 10, 2012 at 13:08 UTC | |
by ikegami (Patriarch) on Oct 10, 2012 at 18:11 UTC | |
by Marshall (Canon) on Oct 12, 2012 at 06:36 UTC | |
|
Re^2: Numeric sorting WITHOUT <=>
by ria1328 (Initiate) on Oct 10, 2012 at 17:07 UTC | |
by ikegami (Patriarch) on Oct 10, 2012 at 18:16 UTC |