Which is really just evaluating a match/mismatch case, but with some intermediate code to increment $scrubbed.sub delete_field { my $self = shift; my ($deleter) = @_; my $scrubbed = 0; @{$self->{_fields}} = grep { !(($deleter eq $_) && ++$scrubbed) } @{$self->{_fields}}; return $scrubbed; }
In reply to Re: Counting Deletions From List
by tadman
in thread What's the best metaphor for deleting something from a list?
by petdance
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |