Something like
or something along those lines it would make it much harder to actually do anything underhanded.if($exp =~ /^[-+/*%()\s\d]+$/) { print eval $exp; }
Exactly what taint mode encourages people to do.
In reply to Re^2: Chomp a numerical expression, return the answer.
by suaveant
in thread Chomp a numerical expression, return the answer.
by sub_chick
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |