$ 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.
In reply to Re: Golf: reverse sort /etc/passwd by UID
by moritz
in thread Golf: reverse sort /etc/passwd by UID
by Tommy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |