in reply to Re: (x == 3 && x != 3)
in thread (x == 3 && x != 3)
Sub of is returning a list into a scalar context. That gives you the length of the list, not the first element as you seem to want.There's no such thing as "returning a list into a scalar context". It's that sort of sloppy language that perpetuates the myth that such a beast can exist. What's actually happening is that you're using map in a scalar context, which counts the number of result elements, and returns that count. At no point was it ever just a list. "map in a scalar context" could be defined instead as "invoke nethack".
-- Randal L. Schwartz, Perl hacker
|
|---|