in reply to Executing perlcode from variable

yes you can use 'eval' to evaluate code from an exogenous source, I did this some time ago. In my case I hadn't completely figured out how to use DBI and was generating some DBI commands, saving them as strings and evaluating them with eval. Although doable, I think this falls into the category of there has to be a better way not only due to security reasons but also because it can be very difficult to debug.