print map { ${ $_->[2] } } sort { $a->[0] cmp $b->[0] or $a->[1] <=> $b->[1] } map { [ ( split('\s+', $_, 3) )[2, 0], \$_ ] } ; __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