Normally, $a = ( ...list... ); will store the number of elements in the list in $a.
Did you test that before you wrote it?
$ perl -le '$a = (3, 4, 5); print $a' 5
I think you're confusing lists and arrays.
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re^2: Return Value of List-Producing Elements in Scalar Context
by davorg
in thread Return Value of List-Producing Elements in Scalar Context
by pikus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |