|
|
| Perl Monk, Perl Meditation | |
| PerlMonks |
Re: Golf: reverse sort /etc/passwd by UIDby moritz (Cardinal) |
| on Feb 05, 2013 at 18:17 UTC ( #1017242=note: print w/ replies, xml ) | Need Help?? |
|
Here's a Perl 6 solution, works with current Rakudo. Not really golfed, just the way you'd write it in a terse way:
The nice part is that Perl 6's sort method automatically does the Schwartzian transform for you if the comparison code object takes only one argument.
In Section
Meditations
|
|
||||||||||||||||||||