Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: my $var = join('|',@array) not behaving

by chromatic (Archbishop)
on May 09, 2008 at 06:50 UTC ( [id://685609]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://685609]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-25 17:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found