Of course you're still left with the problems of code which could mess with your machine, but that's another story.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 $@;
_________
broquaint
In reply to Re: securely evaluating an expression
by broquaint
in thread securely evaluating an expression
by Len
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |