in reply to Deleting elements from array questions

grep can do what you're trying to accomplish. Consider the following:

#! /usr/bin/perl use strict ; use warnings ; $|++ ; my @array = qw( foo bar match zoot zoot match match match ) ; my $item = 'match' ; print "Original size: " . @array . "\n" ; print "Original contents: " . join( " : ", @array ) . "\n\n" ; my @new_array = grep { ! /^$item$/ } @array ; print "New size: " . @new_array . "\n" ; print "New contents: " . join( " : ", @new_array ) . "\n\n" ; __END__

Results:

Original size: 8 Original contents: foo : bar : match : zoot : zoot : match : match : m +atch New size: 4 New contents: foo : bar : zoot : zoot
Update: Whoops, was doing the exact opposite of the poster's question. All better now.
_______________
DamnDirtyApe
Those who know that they are profound strive for clarity. Those who
would like to seem profound to the crowd strive for obscurity.
            --Friedrich Nietzsche