DB<2> @a=1..10 DB<3> $#a = 3 DB<4> x @a 0 1 1 2 2 3 3 4
In other words autovivification is necessary to allow this feature.
Lvalues can be passed around, Perl can't be sure if it's only used for a read access.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
In reply to Re^2: Using $# defines a variable?
by LanX
in thread Using $# defines a variable?
by smittypaddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |