if ($string !~ /asdfasdf/) { ... } is equivalent to if (! ($string =~ /asdfasdf/) ) { ... } or unless ($string =~ /asdfasdf/) { ... }