On Tue, Oct 02, 2018 at 05:28:01PM -0700, ToddAndMargo wrote:
: On 10/2/18 11:23 AM, Ralph Mellor wrote:
: >So, to recap: a postfix `[]` acts on whatever is on its left,
: >pulling out elements from the thing on its left, treated as
: >a list like thing, with the elements selected according to
: >the index(es) inside the brackets.
: >
: 
: 
: Perfect!  Thank you!
: 
: I am going to quote you in my write up.
: 
: Question: in Perl syntaxland, is "postfix" short
: for "postcircumfix"?

Kinda the other way around.  A postcircumfix is just a special kind of
postfix that happens to enclose an extra argument, with the result that,
while your typical postfix has only one argument (like the $a of $a++),
your typical postcircumfix has two (like the @a and 42 of @a[42]).

The second syntactic argument is often interpreted as a slice or an
function argument list later on, but syntactically it's just a single
expression inside the bracketing chars.  So in @a[42,43], there are
still only two arguments, @a array and the 42,43 list expression.

Larry

Reply via email to