I know in perl you can interpolate scalars by simply doing this:
"This is my $string"
However, I'm wondering if there is a way where I can interpolate actual perl code to be evaluated? An idea of what I want can be seen with ruby strings:
"5 + 4 = #{5 + 4}"
And it will evaluate whatever is in between the {}
.
Does anyone know of a way to do this in perl? Thanks!