http://www.perlmonks.org?node_id=819785


in reply to scalar in list context

Maybe you mean the context of the assignment?

@array = ( "one", "two", "three" ); ($len) = @array; $len1 = @array; print "1 - ", $len, "\n"; print "2 - ", $len1, "\n";

Where the first will print "one" and the second will print "3", since (IIRC) assignment forces the context of the LHS onto the RHS.

Update: See ikegami's post below for the correct explanation of what I was trying to say.