Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: array assignment with list operator , no parenthesis

by shmem (Chancellor)
on May 14, 2007 at 11:40 UTC ( [id://615281]=note: print w/replies, xml ) Need Help??


in reply to array assignment with list operator , no parenthesis

Perl has the tools you can use to answer that question to yourself - apart from the docs (see perlop), B::Deparse is helpful:
perl -MO=Deparse,-p -e 'my @one = 7,2,3; print "@one"' ((my(@one) = 7), '???', '???'); print("@one\n"); -e syntax OK

From the extra grouping parens you can read the precedence. The '???' means that the expression it stands for has been optimized away.

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-03-29 08:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found