On Fri, 20 Sep 2002, Jonathan Scott Duff wrote: > > But I cannot tell whether (7) is list context or numeric context, > > Nope, you can't tell without the surrounding context: > > (7) + 0; # numeric > $a = (7); # list > (7) == 1; # boolean (same as (7).length == 1)
No, that last one is clearly numeric context. == operates on numbers and returns boolean. I can't tell whether (7).length is asking for the length of 7 or the length of a list, but I would be badly surprised if (3+4).pow(2) returned 1 instead of 49. ~ John Williams