use strict; use warnings; my $string = "aaaaaaaaa"; my $modifiers = "g"; eval "\$string =~ s/a/b/$modifiers;"; print $string;
Update: note that only question 1 was answered because only question 1 was asked at the time of posting. OP performed a substantive silent update subsequent to the initial create.
In reply to Re: How to apply modifiers to a substitution via variable?
by GrandFather
in thread How to apply modifiers to a substitution via variable?
by lokiloki
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |