use Interpolation; tie my %EVAL, Interpolation => 'eval'; # or: tie my %EVAL, Interpolation => sub { shift }; print <<"END"; The sum of 3 and 4 is $EVAL{3+4}. END