Better:
eval "\$source =~ s/\$find/\$replace/$opt";
Even better:
$opt =~ /[^imsx]/ and die(...); eval "\$source =~ s/\$find/\$replace/$opt";
In reply to Re^2: How do I change substitution options within a program?
by ikegami
in thread How can I change substitution options within a program?
by b2sing4u
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |