How about this?
@terms = grep ! /^(.*)$term(.*)$/, @terms;
(not sure why your regexp isn't simply /$term/, and your original if statement seems confused, I presume you meant $_ =~ /^(.*)$term(.*)$/…)
In reply to Re: remove value from array without index
by conrad
in thread remove value from array without index
by rsiedl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |