Why doesn't Perl's "sort" put these hash keys in numeric order?
sort
always defaults to string comparison.
If you want a numeric sort, you have to be explicit.
sort {$a <=> $b} (keys %hash)
sort
always defaults to string comparison.
If you want a numeric sort, you have to be explicit.
sort {$a <=> $b} (keys %hash)