print $line if ($line =~ /$regex/$opts);Make that
print $line if ($line =~ /(?$opts:$regex)/);
In reply to Re: Is there any way to put regex modifiers into a variable?
by bart
in thread Is there any way to put regex modifiers into a variable?
by hilitai
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |