in reply to eval output

I think the answer you are after is....it just runs the code in your current environment.
$doit = "print"; $x = 3; $cmd = "$doit \$x"; eval($cmd)
yields "3" as ouput; the $cmd variable is "print $x" which eval'ed in your context produces the "3" output.

Is that what you were after?