in reply to Re: my $var = join('|',@array) not behaving
in thread my $var = join('|',@array) not behaving

Parens () construct a list which you can assign to an array.

Nit: parens group a list. The list is already there, but the precedence of = and , are such that without parentheses, only the first element of the list gets assigned.

Replies are listed 'Best First'.
Re^3: my $var = join('|',@array) not behaving
by ikegami (Patriarch) on May 09, 2008 at 07:16 UTC

    such that without parentheses, only the first element of the list gets assigned.

    Since we're being picky about the language, the list being assigned only has one element, so it's odd to refer to its first element. The assignment is the first element of the larger list.