in reply to securely evaluating an expression

You could try out the Safe module and run the code in a Safe compartment with a restricted opset e.g
use Safe; use Opcode; my @permit_opsets = qw(print :base_core :base_mem :base_loop :base_math); my @deny_opsets = qw(die warn); my $c = Safe->new(); $c->permit_only( @permit_opsets ); $c->deny( @deny_opsets ); $c->reval( "@ARGV" ); die("ack: $@") if $@;
Of course you're still left with the problems of code which could mess with your machine, but that's another story.
HTH

_________
broquaint