@v=((grep { $_ <= $pivot } @$v), (grep { $_ > $pivot } @$v)); #### my @v=nkeysort { $_<$pivot ? $_ + 200 : $_ } @$v; #### my @v=((sort {$a<=>$b} (grep { $_ >= $pivot } @$v)), (sort {$a<=>$b} (grep { $_ < $pivot } @$v))); #### my @sorted = nkeysort { ( ( sort {$a<=>$b} (grep { $_ >= $pivot } @$_) ), ( sort {$a<=>$b} (grep { $_ < $pivot } @$_) ) )[50] } @data;