Normal would be:
@ranks= sort { my ($A) = (split($a,'')))[0]; my ($B) = split($b,'')))[0]; $A[0] <=> $B[0] }@ranks; #sorts on numeric comparison #between item's [0] in the @ranks array }
In reply to Re: Loops in Perl
by Marshall
in thread Loops in Perl
by carlriz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |