develooper Front page | perl.perl5.porters | Postings from March 2000

Re: [ID 20000317.003] missing slice of reference

Ronald J Kimball
March 18, 2000 08:46
Re: [ID 20000317.003] missing slice of reference
Message ID:
On Sat, Mar 18, 2000 at 04:27:12PM +0100, Johan Vromans wrote:
> "M.J.T. Guy" <> writes:
> > Once you've accepted @x->[2] as a shorthand for (\@x)->[2],
> I know a much better shorthand for (\@x)->[2]: $x[2].
> > these are all features.
> Even: print scalar(@cast)->{age}->{name}; \N{GREAT QUESTIONMARK}

The -> operator already puts its left hand operand in scalar context, so
the explicit call to scalar is redundant.

Compare to:


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