in reply to Re: How do you evaluate a perl command that is in a perl string?
in thread How do you evaluate a perl command that is in a perl string?

the result of executing $string are captured into $@.

The parent is essentially correct but this part is not quite. $@ captures not the "result" of the evaluation, but rather the error message that would be displayed when the eval code died had it not been an eval. If the eval code finishes normally and does not die, then $@ is undefined.

  • Comment on Re^2: How do you evaluate a perl command that is in a perl string?