Sorry. I never got back to checking the fix properly.
Would you please try replacing the last line with this (note:pre-decrement not post-decrement).
return \@best, [ grep{ !exists $seen{ $_ } or !--$seen{ $_ } } @$a +Ref ];
In reply to Re^5: Divide array of integers into most similar value halves
by BrowserUk
in thread Divide array of integers into most similar value halves
by Pepe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |