in reply to Running a Perl script stored in a variable

Danger, Will Robinson!

eval will do this, but be very sure you know the contents of your string are safe.

Replies are listed 'Best First'.
Re^2: Running a Perl script stored in a variable
by dr_dunno (Novice) on Mar 28, 2008 at 17:30 UTC
    Oh, thanks a bunch.

    I understand the risk of the string contents being incorrect/unsafe. However, the script will be used in a controlled test environment where the string contents would be guaranteed to be correct.

    Cheers,
    Deiva
      Now I'm curious: why would you do this rather than simply running the script?