[ Snip ] > Second suprise: > > people on irc said > truth is a scalar concept. it can't work at all otherwise. > > @y = (0,1); > print "@y" if @y = @y; # (0,1) <--- Why this works?? it is list, not scalar You aren't clear what "it" in "it is list" refers to. The statement has several sub expressions, some in scalar context, others in list context. The if statement evaluates its argument in scalar context. Its argument is a list assignment. The value of a list assignment in scalar context is the number of elements on the LHS of the assigment. (This is what my $matches = () = $str =~ /(foo)/g; makes work). [ Snip ] AbigailThread Previous | Thread Next