in reply to How can I change substitution options within a program?
$source = "abc"; $find = "a"; $replace = "x"; $opt = "g"; eval "\$source =~ s/$find/$replace/$opt"; print $source;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How do I change substitution options within a program?
by ikegami (Patriarch) on Nov 01, 2006 at 17:09 UTC |