develooper Front page | perl.perl5.porters | Postings from November 2010

Re: [PATCH] Add "safe arrow/safe dereference" operator: &&->

Thread Previous | Thread Next
From:
John
Date:
November 13, 2010 08:35
Subject:
Re: [PATCH] Add "safe arrow/safe dereference" operator: &&->
Message ID:
4CDEBE3C.8030002@virginmedia.com

> Question: how is&&->  going to work on an lvalue:
>
>      my $foo&&->  [0] = "bar";
>
> Fatal error?
>
>
> Abigail
You are trying to assign something to  $foo->[0], so i'd say $foo &&-> 
[0] = "bar" ignores the && and autovivifies if necessary..

John

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