print map { ${ $_->[2] } } sort { $a->[0] cmp $b->[0] or $a->[1] <=> $b->[1] } map { [ ( split('\s+', $_, 3) )[2, 0], \$_ ] } <DATA>; __DATA__ 7 modify ldfapg pub abc.h 8 modify bfxml dtd/src newfiles.ksh 9 delete bfxml dtd/src newfiles.ksh 10 modify bfxml dtd/src newfiles.ksh
In reply to Re: problem sorting by non-consecutive fields
by ccn
in thread problem sorting by non-consecutive fields
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |