in reply to Re: Chomp a numerical expression, return the answer.
in thread Chomp a numerical expression, return the answer.

or at the very least limit the input...

Something like

if($exp =~ /^[-+/*%()\s\d]+$/) { print eval $exp; }
or something along those lines it would make it much harder to actually do anything underhanded.

Exactly what taint mode encourages people to do.

                - Ant
                - Some of my best work - (1 2 3)