The problem is that this throws errors like 'Argument "apwu749_d5" isn't numeric in sort at update_settings.pl line 87' because it's trying to sort the hash keyed with a string numerically. What's the best way to modify this subroutine so it works for all kinds of hashes?sub hash_sort { my ($hash) = @_; return [ (sort {$a <=> $b} keys %$hash) ]; }
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon";
$nysus = $PM . $MCF;
Click here if you love Perl Monks
In reply to Using Data::Dumpers Sortkeys subroutine by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |