in reply to The Comma Operator

With my limited knowledge on this, I think this is what's happening: First of all the comma operator in scalar context evaluates the left side, throws it away, and then return the right side. ie.

$a, $b, $c = 1, 2, 3; the order of evaluation is (((( $a ), $b ), $c = 1 ), 2), 3) so... 1) $a gets evaluated 2) $b gets evaluated 3) $c = 1 gets evaluated 4) 2 gets evaluated 5) 3 gets evaluated 6) return 3

Same thing for print:

print( 1 ), print(2), print("\n" ); 1) print (1 ) gets evaluated 2) print ( 2 ) gets evaluated 3) print ( "\n" ) gets evaluated 4) return result of print ("\n")

P.S. -- I'm taking an educated guess here, so feel free to correct me if I'm wrong... :-)