[sf-perl] Referencing a variable???

yary not.com at gmail.com
Tue Jul 28 16:25:13 PDT 2009

I'm wondering if you started using "my" to lexicially scope your
parameters, and in the process broke your symbolic references.

use v5.10.0;

our $parm1="hello";
my $parm2="world";

my $parmName="parm1";
say $$parmName;  # says "hello"
my $parmName="parm2";
say $$parmName; # says nothing, warns about uninitialized value

use an array "@parm"!

back to work...

More information about the SanFrancisco-pm mailing list