in reply to Mileage with safe

Have a look at 'perldoc Safe' for basic advice. The documentation is quite good.
Also look at Safe module security and emebeded perl and Perl sandbox for some advanced topics.

Safe module works quite good for me. I limit posibilities of perl code embeded in XML templates with Safe, and I'm happy with it. As soon as you find the proper set of opcodes to allow, it works fine.