in reply to perl sandboxing
I know that buubot allows execution of perl snippets over IRC in some kind of sandbox, it might be worth looking at how it does that.