develooper Front page | perl.perl5.porters | Postings from August 2013

Re: postfix dereference syntax

Thread Previous | Thread Next
Father Chrysostomos
August 13, 2013 01:02
Re: postfix dereference syntax
Message ID:
David Nicol wrote:
> New and improved postfix syntax test file

Getting better.  I still see no tests for ->*{ and ->%{.

In one place I see you use $ref->**->{IO}.

$ref->**->{IO} is equivalent to *$ref->{IO}, which is equivalent to
(\%{*$ref})->{IO} and similar to *$ref{HASH}->{IO} (except the latter
does not autovivify).

Maybe you meant $ref->*{IO} or $ref->**->*{IO}, which mean *$ref{IO}
and *{*$ref}{IO}, respectively, which both do the same thing (*{} is

And how about some fun, like:

is (\_->$*, \$_);
is (\_->*{SCALAR}->$*, \$_);
is (\_->**->*{SCALAR}->$*, \$_);

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About