5
$text =~ /"helloworld"/g

I want to have this regex modifdier 'g' into a variable so that later I can change it to a different modifier like this 'i', 's' so on

e.g.

$text="helloworld"
$test="helloworld"
$modifier="g"

$text =~ /$test/$modifier
xyz
  • 51
  • 1

0 Answers0