in reply to eval function

Have you read the eval documentation? Do you have any specific questions after reading it? Is there a particular problem you're trying to solve?

Replies are listed 'Best First'.
Re^2: eval function
by Tony1 (Novice) on Apr 13, 2007 at 15:28 UTC
    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
      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);