I am fairly new to Perl so I wasn't real sure how to title this.
I want to build a regex interactively in a program and then run it. So
far I do it by writing it to a file along with the Perl envelope around it
then calling it from my program. Works ok but seems clunky. Then I found
a tutorial about executing perl code in a regular expression but so far it
hasn't quite worked the way I want.
So... Is it possible to put a legimate line of Perl code in a variable,
then (somehow) execute that variable. Sort of like so...
$z = "Print amount";
(execute) $z;
Or put another way. Build program B within program A then run program B
within the original program A?
If this was a standard programming environment like Builder or Kylix I
wouldn't even ask such a rediculous question, but in my so far brief
experience with Perl I haven't found much it won't to.
JP