Hope that helps.perl -w -MData::Dumper -e ' @old = ( "10.5 AA", "9 AC", "2 BB"); @new = sort {($b =~ /(\d+)/)[0] <=> ($a =~ /(\d+)/)[0]} @old; print Dumper \@new; '
In reply to Re: Numeric Sort for Stringified Value (How to Avoid Warning)
by monkfan
in thread Numeric Sort for Stringified Value (How to Avoid Warning)
by neversaint
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |