Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
eval problemby 7stud (Deacon) |
on Dec 03, 2009 at 20:04 UTC ( [id://810927]=perlquestion: print w/replies, xml ) | Need Help?? |
7stud has asked for the wisdom of the Perl Monks concerning the following question: Dear Monks, Here is a simple program employing a simple regex match, which gives me the desired output:
When I get the pattern from the command line, the result is the same:
But if I also get the replacement from the command line, then there is a problem:
I've tried using eval, but that doesn't work either:
How can I get perl to evaluate the replacement string in the context of my program? Note: I also tried the /e and /ee modifiers for s/// with no luck.
Back to
Seekers of Perl Wisdom
|
|