in reply to Perl list items
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl list items
by frozenwithjoy (Priest) on Jul 09, 2012 at 15:36 UTC | |
by monsoon (Pilgrim) on Jul 09, 2012 at 16:07 UTC | |
by frozenwithjoy (Priest) on Jul 09, 2012 at 16:17 UTC | |
by robertw (Sexton) on Jul 09, 2012 at 17:57 UTC | |
by davido (Cardinal) on Jul 10, 2012 at 00:34 UTC | |
| |
by aaron_baugher (Curate) on Jul 09, 2012 at 19:24 UTC | |
| |
by tobyink (Canon) on Jul 09, 2012 at 16:17 UTC |