Close, but not entirely true:
>perl -le "print for sort @ARGV" 1 10 2 20 1 10 2 20
But with an explicit comparison, it works:
>perl -le "print for sort{ $a <=> $b } @ARGV" 1 10 2 20 1 2 10 20
In reply to Re^2: Inertion sort in perl
by Corion
in thread Inertion sort in perl
by vinoth.ree
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |