in reply to remove value from array without index

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(.*)$/…)