Thanks for the update. I don't have time to look at it currently, but a perl rules engine sounds interesting.
It looks like you need something to interpolate your string. So, something like changing your print routine to include an eval of the string?
I don't think the code below works, but may prove helpful? You may also find yourself doing a search on the returned string to fill in values... blech.
orig:$string =~ s/\$(\w+)/ ${$1} /xeg;
new:print " ----------------- " . $ref->{attribute} . "\n"
my $string = $ref->{attribute}; my $output = eval $string; if($@){ die "problem with eval: $@"; } print " ----------------- $output\n";
In reply to Re^3: Extending Perl::PIE - how to have Perl snippets executed ?
by spazm
in thread Extending Perl::PIE - how to have Perl snippets executed ?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |