I am trying to delete a entry in an array of hashes.  The entry is deleted
properly but the array size does not diminish.

The output is:
Before=8
VNC
After=8
Before=8
Norton
After=8

Here is the Sub that is causing my grieve:

###########################
# Delete a hash from the  #
# array                   #
###########################
sub DeleteHash {
   my ($szpackage, @array) = @_;
   my $szTemp;
   my $test;

   $test = @array;
   print "deleted $szTemp $szpackage\n";

   print "test=$test\n";
   for $szTemp ( 0 .. $#array ) {
      if ( lc($array[$szTemp]{'package'}) eq lc($szpackage)) { 
         print "$szpackage <--- $array[$szTemp]{'package'}\n";
         splice(@array, $szTemp, 1);
      }
   }
   $test = @array;
   print "test=$test\n";
   return (@array);
}

Tad Chrapko
Internal Technology Services (ITS)
City of St. Albert
mailto:[EMAIL PROTECTED]
http://www.city.st-albert.ab.ca
Tel: 780-459-1666
T8N 3Z9

The information contained in this e-mail is intended for the addressee only.
Any other distribution, coping or disclosure in whole or in part by any
other person is prohibited. If you have received this e-mail in error,
please notify me immediately and delete any electronic and any hard copies.

_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to