$re[0] = qr (.*(?!system))i; $re[1] = qr (system)i; $v[0] = "oneitem"; $v[1] = "anothersystem"; for $a (@v) { for $r (@re) { print "\nRegex: $r\tValue: $a\n"; if ($a =~ /$r/) { print "$a matches $r\n" ; } } }