Dave Whipp wrote:

>    print @a + $b
> 
> This will evaluate each, in numeric context. To get at those numbers,
> Perl will translate this to something like
> 
>    print @a.FETCHSIZE + $b.FETCHNUM

I thought[*0] that Larry said arrays in a scalar context are now treated
as array references, so actually both sides are array refs.  Then
there's a further rule that array refs in _numeric_ scalar context yield
the number of elements in the array (since it doesn't make sense to do
arithmetic on references).

So it's C<@a> that's going through two steps to get to the size, not
C<$b>.

I'm not sure how much that effects the general point you were trying to
make.

  [*0]  Though this is just from memory.  I've just had a brief scan
  through Apocalypse 2 and can't find it, so I could be wrong.

Smylers

Reply via email to