in reply to Re^2: use of parentheses around a variable
in thread use of parentheses around a variable
First, keep in mind that
(my $var1, $var2, $var3)
is different than
my ($var1, $var2, $var3)
and
(my $var1, my $var2, my $var3)
The first only declares one variable but the other two declare three.
>perl -Mstrict -e"my ($x, $y)" >perl -Mstrict -e"(my $x, my $y)" >perl -Mstrict -e"(my $x, $y)" Global symbol "$y" requires explicit package name at -e line 1. Execution of -e aborted due to compilation errors.
Now on to your question. What good is making a construct you can't access? That would be quite counter-productive. Either I don't know what you mean by "access", or the answer is "Of course you can access a list".
|
|---|