cloud wrote:
>
> although $i = $i run before $i++, But
> the increment should be work, so $i should be 1, isn't it?
The precedence of ++ is higher than = , so the increment takes place
making $i = 1 and then $1 is set to the orig $i before the increment.
Replace
$i = $i++;
with just
$i++;
> > On Fri, 15 Jun 2001, cloud wrote:
> >
> > > All:
> > >
> > > I excute follow code & got some Strange result,
> > > Why? Why $i = 0
> > > ===========================
> > > $i = 0;
> > > $i = $i++;
> > > print "$i\n";
> > > ===========================
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.webjump.com/ (Free Perl site)
-/-' /___/_<_</_</_ Castle of Medieval Myth & Magic http://www.todbe.com/
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users