in reply to Debating With Friends

Result is that it gives is "equal". Why?

Because eq is a function with infix syntax. That is:  a eq b is actually eq( a, b ).

Thus, by the time eq() sees the parameters, both assignments have been done, and it just gets two copies of the (same) final value.

Viz

sub eq{ print "@_"; $_[0] eq $_[1] };; print eq( $x=1, $x=2 );; Ambiguous call resolved as CORE::eq(), qualify as such or use & at (ev +al 13) line 1, <STDIN> line 5. Use of uninitialized value $_ in print at (eval 13) line 1, <STDIN> li +ne 5. print &eq( $x=1, $x=2 );; 2 2 1

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked