On 4/18/05, Lloyd Sartor <[EMAIL PROTECTED]> wrote:
> Jerry Kassebaum wrote on 04/17/2005 06:56:29 AM:
> 
> >
> > $x=10;
> >
> > $x=$x++;
> >
> > print "$x\n";
>
> 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.

1. The current value of $x is stored in register "foo"
2. The current value of $x is incremented by 1, then stored back in $x
3. The contents of register "foo" is stored in $x

-- 
pDale

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to