in reply to Re: eval function
in thread eval function

hai i a had read it but i and also understand some how but it's not working while using eval in my perl programming i want to know the meaning of the eval function

Replies are listed 'Best First'.
Re^3: eval function
by Joost (Canon) on Apr 13, 2007 at 15:49 UTC
Re^3: eval function
by dynamo (Chaplain) on Apr 13, 2007 at 15:49 UTC
    What did you try that didn't work?

    Here are some examples that might help:

    # this prints "something" with extra layers of pointless recursion: print (eval (eval (eval (eval (eval (eval "something"))))); # prints 1024 $it = "ev"."al (".substr("devaluation",1,4) . "(2+2)" ."*"x2 . " 3)"; foreach (0..3) { $it = "eval($it) * 2" } print eval($it);