My suggestion is to use hash:
my %already_selected; ...... unless ( $already_selected{$find} ) { $already_selected{$find}++; #this number is selecting first time .... }
And of course don't use splice if you don't want destroy original array.
In reply to Re: Select value from array w/o replacement (or destroying the array)
by Gangabass
in thread Select value from array w/o replacement (or destroying the array)
by BioNrd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |