If you're running your script under 'use strict' ( and you'd better do
it always, I think ) - it contains use strict "refs" which doesn't
allow you to use a symbolic references ( ${"aaa"} is $aaa )
This saves you from dereferencing a wrong variable :
${ $variable } - if $variable is occasionally a string ( say "xxx" )
you'll get the $xxx when you probably meant that $variable should be
a scalar reference ( and not a string, which was a mistake )
More. You can't use symbolic reference to $aaa via ${"aaa"} if $aaa
declared via my :
C:\>perl -w
my $j = 5;
$i = 10;
print ${'j'}, "\n";
print ${'i'}, "\n";
^Z
Name "main::i" used only once: possible typo at - line 2.
Use of uninitialized value in print at - line 3.
10
C:\>
5 isn't printed - "Use of uninitialized value in print" ! Because $j
was declared via my it's not sitting in any symbol table and isn't
accessible using the symbolic reference.
So, as you see you have almost to forget about 'use strict' for the sake
of symrefs. Should you ?