if ( 'asdf' =~ /(?$icase)$str/ ) { print "it works!\n" }