in reply to Re: variable declaration question
in thread variable declaration question
print(my $foo = (1, 2, 3), "\n"); print(my ($foo) = (1, 2, 3), "\n"); __END__ 3 1
Ah, I see. The line:
print(my $foo = (1, 2, 3), "\n");
is a convenient way of assigning the last element of an array to a variable.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: variable declaration question
by keszler (Priest) on Jan 18, 2013 at 22:14 UTC | |
by MidLifeXis (Monsignor) on Jan 21, 2013 at 12:31 UTC |