print map { $_->[0] }
sort {
$a->[1] <=> $b->[1]
||
$a->[2] <=> $b->[2]
||
$a->[3] cmp $b->[3]
}
map { [ $_, (split /:/)[3, 2, 0] ] }
qx(cat /etc/passwd);
How do you modularize a multi-criterion sort?
Of course, it can be done, but the resulting
module invocation would be more cumbersome
and less readable than an inline Schwartzian transform. In reply to Re: Schwartzian Transform as a module?
by Sweeper
in thread Schwartzian Transform as a module?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |