in reply to round-robin on varying sequence
How about chucking the $index and rotating the array (shift and push) every time you get an element (which is now always the first)?
remove is now as trivial as it ought to be:
sub remove { my %del = map { $_ => 1 } @_; @items = grep { not $del{$_} } @items; }
— Arien
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: round-robin on varying sequence
by dpuu (Chaplain) on Sep 07, 2002 at 19:12 UTC |