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

Re: postfix dereference syntax

Thread Previous | Thread Next
From:
Father Chrysostomos
Date:
August 12, 2013 22:56
Subject:
Re: postfix dereference syntax
Message ID:
20130812225633.25435.qmail@lists-nntp.develooper.com
David Nicol wrote:
> what's the advantage of $coderef->&* over $coderef->() ???

$foo->&* means &$foo, so:

\$foo->&* # \&$foo
$foo->&*  # &$foo -- sub call sharing @_
goto $foo->&*;

> Also, how about postfix reference operator?
> 
>      my $scalar;
>      my $reference = $scalar -> \*; # instead of \$scalar

Then $x = $x->[-1] becomes $x ->= [1->-*].


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About