in reply to string does not contain
negate the if to an unless:
my $string = "foo bar baz"; print "no hello" unless $string =~ /hello/; [download]