in reply to Enigmatic Symbolic References
(Remember that $x = '$y' is very different from $x = "$y".)DB<1> l 2==> $y = 'bob'; 3: $x = '$y'; 4: $$x = 'wierd'; 5 6: print $$x; # prints 'wierd' ($$x has a value) 7: print ' - '; # print a little seperator 8: print $bob; # prints nothing ($bob is still undefined) DB<1> n main::(-:3): $x = '$y'; DB<1> n main::(-:4): $$x = 'wierd'; DB<1> n main::(-:6): print $$x; # prints 'wierd' ($$x has a value) DB<1> X ~y $$y = 'wierd' $y = 'bob' DB<2> x ${$::{'$y'}} 0 'wierd' DB<3>
Update: Double quotes in the first paragraph changed to single quotes.
|
|---|