Jerry Kassebaum wrote on 04/17/2005 06:56:29 AM:

> 
> $x=10;
> 
> $x=$x++;
> 
> print "$x\n";
> 
> $x=10;
> 
> $y=$x++;
> 
> print "$x\n";
> 
> #Results: $x=10, $x=11.
> #I understand it, but I think it's weird anyway.
> 

The first result ($x=10) puzzles me. Are not the $x on the LHS and RHS 
refering to the same scalar? I would think that $x would be assigned the 
value of $x (10), and then be post-incremented, resulting in 11. 

Explanation?

_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to