<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Nobody else showed up, so I reviewed Sprout's corrections to the postfix dereference syntax test suite.</div><div><br></div><div>Postfix dereferencing may be available in 5.20.</div>
<div><br></div><div>Postfix dereferencing means, instead of putting the sygil on the left side of a name or a scalar holding a reference, you put it on the right end like a method call.</div><div><br></div><div>There are six new postfix dereferencing operators, along with the postfix method calls and scalar container member extraction we've had forever.</div>
<div><br></div><div>Pre-existing postfix dereferencing syntax:</div><div> $obj->METHODNAME send a METHODNAME invocation message to $obj</div><div> $obj->METHODNAME(...) send a METHODNAME invocation message to $obj, with args</div>
<div> $ar->[N] look up an element in an array, like $$ar[N]<br></div><div> $hr->{STRING} look up a value in a hash, like $$hr{STRING}</div><div> $cr->(...) run the code in a code reference with ... as arguments</div>
<div><br></div><div>New postfix dereferencing syntax:</div><div> $sr->$* dereference a reference to a scalar, like $$sr</div><div> $ar->@* dereference a reference to an array, like @$ar</div>
<div> $ar->@[...] array reference slice, like @$ar[...]</div><div> $hr->@{...} hash reference slice, like @$hr{...}</div><div> $gr->** dereference a reference to a typeglob, like *$gr</div>
<div> $gr->*{...} access a slot in a typeglob reference, like *$gr{...}</div><div><br></div><div><br></div><div>As arrow binds tighter than the \ take-a-reference operator, taking references remains prefix only.</div>
<div><br></div><div><br></div></div>-- <br><font face="Arial"><span style="font-size:15.555556297302246px;white-space:pre-wrap">You've got to wiggle before you can crawl<br></span></font>
</div></div>