in reply to Locate emement in array and delete

Update: Reworked the answer to suggest the regex as the primary solution. The other way was unnecessarily complex.

You can grep to filter a list.

#!/usr/bin/perl use warnings; use strict; my @array = grep ! /^--(?:config|enter)$/, @ARGV; print "@array";

If you're not working with strings, you need to use something more complex.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]