Update:use IO::String; ... $data =~ s/<# (\{.*?\}) #>/evalCap($1)/eg; sub evalCap { my $code = shift; my $str; my $str_fh = IO::String->new($str); my $old_fh = select $str_fh; eval $code; select $old_fh; $str; }
- nashdj
In reply to Re: Evaluate in a substitute
by nashdj
in thread Evaluate in a substitute
by fightliteracy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |