if ( $text =~ m/(?$modifiers)$pattern/ ) { print "it matches\n"; }