fix perl warnings in remove_entry()

This commit is contained in:
Steve McIntyre 2009-05-16 13:54:24 +00:00
parent afd7a7a557
commit 699e6b7e62
1 changed files with 5 additions and 2 deletions

View File

@ -629,11 +629,14 @@ sub is_in {
sub remove_entry {
my $value = shift;
my $array = shift;
my $entries = scalar(@{$array});
my $i;
foreach $i (0 .. $#$array) {
for ($i=0; $i < $entries; $i++) {
if (@{$array}[$i] eq $value) {
splice(@{$array}, $i, 1);
$i--;
$entries--;
}
}
}