makes it easier to pass the array.sub sortData { my ($type, @data) = @_; return sort {$a <=> $b} @data if $type eq 'Integer' || $type eq 'Float'; return sort @data; }
-Mark
In reply to Re: A problem sorting numbers with sort()
by kvale
in thread A problem sorting numbers with sort()
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |