1 is the number of elements in the list.
This line:
@A = join( "," .....
Creates a single element that is a string containing a bunch of comma delimited data.
This line:
$A = @A;
Evaluates @A in scalar context, which causes Perl to assign a count of the number of elements in @A to $A.
Those issues will be discussed in perlintro, and join.
In particular, the purpose of join is to turn a list into a single scalar value.
Dave
In reply to Re: Perl list items
by davido
in thread Perl list items
by robertw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |