in reply to Golf: reverse sort /etc/passwd by UID
$ cat /etc/passwd | perl6 -e '.say for lines.sort: +*.split(":")[2]'
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.
|
|---|