http://qs321.pair.com?node_id=188669

chuleto1 has asked for the wisdom of the Perl Monks concerning the following question:

Is there a way to have this done in an easier way?
And have the array collapse shrink?
(i.e. if the array size is 10 when this happens '@array[count] = "";' have the array size shrink to size 9)?

$count = 0; $item = "match"; foreach $element (@array) { if($element eq $item) { @array[count] = ""; } count++; }

Edit by myocom: Added code tags