Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!sun!stef From: stef@zweig.sun (Stephane Payrard) Newsgroups: comp.lang.perl Subject: I ${$a} Message-ID: Date: 11 Oct 90 08:51:28 GMT Sender: news@sun.Eng.Sun.COM Organization: Sun Microsystems -- Mountain View Lines: 31 I would expect a expression like ${$a} to evaluate from inside out: It is not the case as demonstrated by the following test. % perl -e '$b=2;$a="b";print ${$a};' I would expect ${$a} to evaluate to 1 the following way: ${$a} -> ${"b"} -> $b -> 1 What is the canonic way to write an expression which behaves like I exprected (I guess it imply to use `eval'). This lead to RFE: supporting this kind of multilevel evalation of string: -If an expression contains the construct ${expression}, this construct is evaluated and replaced by its value before the string contained it is evaluated. stef -- Stephane Payrard -- stef@eng.sun.com -- (415) 336 3726 SMI 2550 Garcia Avenue M/S 10-09 Mountain View CA 94043