Keep It Simple, Stupid | |
PerlMonks |
Re: Parsing Math Stringsby lhoward (Vicar) |
on Dec 06, 2001 at 20:27 UTC ( [id://129964]=note: print w/replies, xml ) | Need Help?? |
Several people have recomended using eval to solve this problem. Though eval will work, it can be very dangerous in situations where you do not have control over the data passed in to the eval (such as in the case of a cgi script). Consider if you were using evel and someone were to pass in
system("rm -rf *") to your CGI program instead of the math expression you were expecting?
In Section
Seekers of Perl Wisdom
|
|