$_ = "hello Gags"; if( /hello/ and not /Ga/ ) { print 'Matched' } else { print 'Failed' }; Failed