http://www.perlmonks.org?node_id=1229500


in reply to Fastest way to sort a list of integers into 0,1,2,3,-3,-2,-1

Well, tried :)
td => sub { my $q = POE::Queue::Array->new; for (@input) { $_ == 0 && $q->enqueue(-1000,$_)&& next; $q->enqueue(-1/$_,$_); } my @out; while (my @l = $q->dequeue_next()) { push @out,$l[2]; } Compare(\@out,\@output) or die "@out" if DO_CHECK; }