It just occurred to me that C<part> is almost a specialization of C<sort>. Consider the results if you assign without binding:
sub comparator { when /hi/ { 0 } when /lo/ { 1 } default { 2 } } @input = qw(high low hi lo glurgl); @out1 = part comparator @input; @out2 = sort { comparator $^a <=> comparator $^b } @input; Identical, aren't they? If C<sort> returned all items that evaluated to 0 (equal) together, they would be identical when bound, too. (Of course, how such a thing would be implemented or even expressed as an exercise for the reader. :^) ) [ It seems that this thread has drifted off-topic. Perhaps a renaming is in order? ] --Brent Dax <[EMAIL PROTECTED]> @roles=map {"Parrot $_"} qw(embedding regexen Configure) "If you want to propagate an outrageously evil idea, your conclusion must be brazenly clear, but your proof unintelligible." --Ayn Rand, explaining how today's philosophies came to be