in reply to Re: how would you detect a math expression
in thread how would you detect a math expression
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.