in reply to Re: File Sorting Rephrased
in thread File Sorting Rephrased
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
|
|---|