Tad writes..
>I am trying to delete a entry in an array of hashes. The entry is
>deleted properly but the array size does not diminish.
What makes you think that the entry is deleted properly? Your code does
not delete the entry in my testing.
Problem comes because you're doing a splice within a for loop that
includes an array (see "Foreach Loops" in perlsyn), basically you just
shouldn't ever do a splice inside a for loop that's iterating over the
same array that you're splicing.
This has the same semantics as what you appear to be doing, perhaps you
can use it instead:
sub DeleteHash {
my $szpackage = shift;
grep { lc $_->{package} ne lc $szpackage } @_;
}
--
Jason King
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs