will do. (Or some other variation to turn the warning off).my @sorted = sort {do {no warnings 'numeric'; $a <=> $b}} @unsorted;
I wish people would stop bending their code backwards just to avoid a warning. Don't be afraid to turn warnings off in such cases.
In reply to Re: Sort an array using the Schwartzian transform
by JavaFan
in thread Sort an array using the Schwartzian transform
by umasuresh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |