in reply to Re: sort/reverse strangeness
in thread sort/reverse strangeness
Of course it's probably going to be more efficient to get the sorting order to reverse than to physically reverse the sorted list after the sort.
for ( sort { $b cmp $a } @keys ) { print "$_\n"; }
Update: Oooh, that's good to know. Never mind me then.
We're looking for a Perl and Database Developer for Corporate Investments Group.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: sort/reverse strangeness
by ikegami (Patriarch) on Oct 29, 2007 at 17:52 UTC | |
|
Re^3: sort/reverse strangeness
by ysth (Canon) on Oct 30, 2007 at 05:23 UTC |