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{$_}); }
In reply to Re: Numeric sorting WITHOUT <=>
by ikegami
in thread Numeric sorting WITHOUT <=>
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |