$text =~ /"helloworld"/g
I want to have this regular expression modifdier 'g' in a variable so that later I can change it to another modifier, for example, this "i", "s" and so on.
eg.
$text="helloworld" $test="helloworld" $modifier="g" $text =~ /$test/$modifier
source share