in reply to unconventional string substitutions
Have a look at eval. Something like this (untested) should work as you desire. I don't think you need the block eval but do not have the ability to test. eval has security implications.
eval{ eval "(\$output = \$string) =~ s/\$regexp/\$new/$suffix" };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: unconventional string substitutions
by ikegami (Patriarch) on Mar 20, 2008 at 05:31 UTC | |
|
Re^2: unconventional string substitutions
by halfcountplus (Hermit) on Mar 20, 2008 at 03:48 UTC |