There are probably already packages that do this — particularly if you're really only interested in math expressions. However, if you wish to write your own reasonably safe math parser/grammar, a good place to start might be: Parse::RecDescent.
Another direction you could go is the Safe module. I doubt I'd execute code from some random third party on my computers, but if I did, I'd use Safe and a chroot and probably various other things — and still lose sleep over it.
-Paul
In reply to Re: eval question
by jettero
in thread eval question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |