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

Re: [ID 20000317.003] missing slice of reference

From:
JVromans
Date:
March 17, 2000 08:06
Subject:
Re: [ID 20000317.003] missing slice of reference
Message ID:
m2em99twha.fsf@phoenix.squirrel.nl
"M.J.T. Guy" <mjtg@cus.cam.ac.uk> writes:

> >                                                        And I cannot
> > see why 'scalar(@x)->[2]' produces the 3rd element of array @x.
> 
> Where does it say anything about scalar context?

As far as I can tell, scalar(@x) is 4, and 4->[2] points to nothing
defined, most certainly not to $x[2].

-- Johan





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