in reply to How to evaluate a formula?

Build a string of executable code and use the eval function.

Note - you had better trust your source. eval will do anything and everything that string says. Including things like "system 'rm -rf /';" ... You have been warned.


  • In general, if you think something isn't in Perl, try it out, because it usually is. :-)
  • "What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?"

Replies are listed 'Best First'.
Re^2: How to evaluate a formula?
by tmy05 (Initiate) on Jun 01, 2005 at 14:57 UTC
    Thanks