I think you want
my $dels = join '|', map quotemeta, @dels; @array = grep !/$dels/, @array
That deletes "applepie" when "apple" is in @dels.
In reply to Re^3: deleting a specific element from an array
by ikegami
in thread deleting a specific element from an array
by sugar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |