Not a direct answer to your problem, but consider using a Schwartzian transform rather than repeated splits.
my @sorted = map { $_->[1] } sort { $b->[0] <=> $a->[0] } map { [ (split(/\|/,$_))[0], $_ ] } @stats;
In reply to Re: Sort ofa Print Problem
by Fletch
in thread Sort ofa Print Problem
by caciqueman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |