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

Re: postfix dereference syntax

Thread Previous | Thread Next
Ricardo Signes
August 15, 2013 18:20
Re: postfix dereference syntax
Message ID:
* Johan Vromans <> [2013-08-15T13:42:23]
> It still escapes me why @* was chosen instead of the much more logical
> [] :

So: ->[] means "the array"
But ->[1,2,3] means "the slice" (a list)
And so ->[()] means "the slice of no elements (an empty list)

It's bound to cause painful confusion.


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