in reply to Re: Return Value of List-Producing Elements in Scalar Context
in thread Return Value of List-Producing Elements in Scalar Context
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Return Value of List-Producing Elements in Scalar Context
by ikegami (Patriarch) on Aug 23, 2004 at 15:43 UTC |