in reply to Evaluate in a substitute
sub process { my $src = shift; # possibly do some pre-processing on $src here my $value = eval $src; # possibly extra external logging if something went wrong return $@ ? "<B>Error in '$src': $@</B>" : $value; }
and then have:
$data =~ s/<# (\{.*?\}) #>/process($1)/eg;
Liz
|
|---|