Not quite. You've left out a couple of the essential steps of the Schwartzian Transform there. Maybe you meant:my @record = sort { $b->[2] cmp $a->[2] } map { chomp; split } <FH>
my @record = map $_->[0], sort { $b->[2] cmp $a->[2] } map { chomp; [$ +_, split] } <FH>;
-- Randal L. Schwartz, Perl hacker
In reply to •Re: Re: File Sorting Rephrased
by merlyn
in thread File Sorting Rephrased
by rchou2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |