Perl Monk, Perl Meditation | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Sorry that's too complicated for me, TL;DR
> I have to understand what (LIST) means in the documentation. According to the docs cited in List's terminology and Parentheses in Perl <updated> Uppercase "LIST" in perldocs is a argument placeholder for any code ...
For instance from the docs for print ... print LIST; means that ...
</updated> > To understand this: > > The scalar comma operator returns the last element. > I must understand in which list it is the last element. Comma separated lists (sic) Please compare (updated)
The parens on RHS only do grouping here they do not create a list. Hence the context is propagated to the operators , and .. @a = and (...)= are "list assignment" imposing "list context". The range 1..3 returns the list value 1,2,3 in list context only. You have to think of the whole statement as an op-tree...
With ...
If that's not clear enough please show a short code exemplifying your problem. HTH
Cheers Rolf
updateyou may want to play around yourself with B::Deparse and B::Concise to experiment around with the snippets shown perl -MO=Deparse,-p -e "CODE" and perl -MO=Concise -e "CODE" In reply to Examples for "LIST", "list context", "list value", "list assigment", "list operator"
by LanX
|
|