Or if you're using a 5.6 or newer perl you can turn off just warnings about the numericness (see perllexwarn for more information).
my @sorted = do { no warnings 'numeric'; sort { $a <=> $b } @data ; };
In reply to Re: (tye)Re: Sorting an array of strings by number
by Fletch
in thread Sorting an array of strings by number
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |