in reply to Re^4: Divide array of integers into most similar value halves
in thread Divide array of integers into most similar value halves
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 ];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Divide array of integers into most similar value halves
by Pepe (Sexton) on Sep 04, 2008 at 15:07 UTC | |
by BrowserUk (Patriarch) on Sep 04, 2008 at 15:57 UTC | |
by Pepe (Sexton) on Sep 04, 2008 at 16:04 UTC | |
by BrowserUk (Patriarch) on Sep 04, 2008 at 16:11 UTC | |
by Pepe (Sexton) on Sep 04, 2008 at 17:35 UTC | |
|