in reply to Accessing (deleting) array elements in a hash of arrays
Try looping like this instead:
for ($acount = $#{$harry{$k}}; $acount >= 0;--$account) { my $a = $harry{$k}[$acount]; for ($bcount = $#{$harry{$phash{$k}}}; $bcount >= 0; --$bcount) { my $b = $harry{$phash{$k}}[$bcount]; if ($a eq $b) ... splice(@{$harry{$k}}, $acount, 1); splice(@{$harry{$phash{$k}}}, $bcount, 1); ...
|
|---|