in reply to Re: Re: Re: infinite loop on while (@array)
in thread infinite loop on while (@array)
Using B::Deparse under ActivePerl b629 (aka 5.6.1)...
C:\> perl -MO=Deparse -e "while (1) { print 1; }" for (;;) { print 1; } -e syntax OK C:\> perl -MO=Deparse -e "for (;;) { print 1; }" for (;;) { print 1; } -e syntax OK
But if I try the for example that demerphq quotes under Perl 5.5.3 (on FreeBSD), I get ...
$ perl -MO=Deparse -le 'for ( my $i = 0; $i < 10; $i++ ) { print 1 }' -e syntax OK my $i = 0; while ($i < 10) { print 1 } continue { ++$i }
Hmmm...
--k.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: infinite loop on while (@array)
by demerphq (Chancellor) on Mar 27, 2002 at 15:21 UTC | |
|
Re: Re: Re: Re: Re: infinite loop on while (@array)
by Juerd (Abbot) on Mar 27, 2002 at 15:16 UTC | |
by demerphq (Chancellor) on Mar 27, 2002 at 15:40 UTC |