jesuashok has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; my $i = 0 ; while ( $i < 10 ) { print "Hello World\n"; } continue { $i ++; }
whatever code written using while ( <condition> ) { } continue { } can be written using simple while ( <condition> ) { }. So, I would like to know the exact usage of while () {} continue {} loop.#!/usr/bin/perl use strict; my $i = 0 ; while ( $i < 10 ) { print "Hello World\n"; $i ++; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: What could be the exact usage of While - continue loop
by GrandFather (Saint) on May 09, 2007 at 03:36 UTC | |
|
Re: What could be the exact usage of While - continue loop
by naikonta (Curate) on May 09, 2007 at 04:18 UTC | |
by GrandFather (Saint) on May 09, 2007 at 04:37 UTC | |
by naikonta (Curate) on May 09, 2007 at 04:58 UTC | |
|
Re: What could be the exact usage of While - continue loop
by davido (Cardinal) on May 09, 2007 at 06:24 UTC |