|
|
| laziness, impatience, and hubris | |
| PerlMonks |
Re^2: how would you detect a math expressionby Molt (Chaplain) |
| on Feb 19, 2007 at 14:11 UTC ( #600849=note: print w/ replies, xml ) | Need Help?? |
|
Sounds more like a dangerous idea.. try Googling for system('rm -rf /'), see if it takes their entire system down. I know that's a very extreme example, and would require a very badly set up system, but bear in mind you've just allowed your random passer-by to do anything the user the webapp's running as could do. Running eval() on user input is a very dangerous hobby, much better to use Parse::RecDescent to parse it into a sane, and safe, mini-languase.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||