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

Re: postfix dereference syntax

Thread Previous | Thread Next
David Golden
July 3, 2013 15:22
Re: postfix dereference syntax
Message ID:
On Wed, Jul 3, 2013 at 11:09 AM, Aristotle Pagaltzis <> wrote:
> However… *this* runs into big trouble:
>     $foo->bar->baz->{qw( foo bar baz )}

Damn.  I forgot about that in my excitement about parallelism.

I think echoing current slice syntax could be the way out of the
general conundrum, even if string interpolation doesn't work easily:

    $array->@[ qw/foo bar baz/ ]
    $hash->@{ qw/foo bar baz/ }

The latter could be ->%{ @list } I suppose, but that's a question for
whether mirroring existing syntax is better than introducing sigil
invariance but only for postfix.


David Golden <>
Take back your inbox! →
Twitter/IRC: @xdg

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