in reply to Resolving scalars in a scalar
First print yields "1 + 2", second print yields "3".$x = 1; $y = 2; $code = "$x + $y"; print $code; print eval $code;
Also, yes, eval sets the global variable $@ to be the value of any exception that was thrown inside of the eval.
|
|---|