in reply to using eval
$question='$x**4-3'; $s="\$answer=$question"; $x=2; eval $s; print "\$answer=$answer\n"; [download]