Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: string does not contain

by aging acolyte (Pilgrim)
on Jan 22, 2003 at 15:41 UTC ( [id://229052] : note . print w/replies, xml ) Need Help??


in reply to string does not contain

TMTOWTDI

negate the if to an unless:

my $string = "foo bar baz"; print "no hello" unless $string =~ /hello/;
A.A.