if ($str =~ "aabb") { print "match found\n"; } else { print "no match\n"; }