This isn't really interpolation. You are initializing $World with a soft reference to it. strict objects to that. Even without strict, you get a syntax error if you try to declare $World as aq lexical that way. It reads,
$ perl -e'my $var = "World";my ${$var} = "hello";' Can't declare scalar dereference in my at -e line 1, near "} =" Execution of -e aborted due to compilation errors. $ perl -e'my $var = "World";${$var} = "hello";print $World' hello$
After Compline,
Zaxo
In reply to Re: String interpolation problem
by Zaxo
in thread String interpolation problem
by rockmountain
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |