R. Joseph Newton wrote:
> Paul wrote:
>
> I guess position of the test is significant in while loops:
>
> #!/usr/bin/perl -w
>
> use strict;
> use warnings;
>
> my $i = 1;
>
> do {print "$i\n"; $i++;} while $i < 1;
> print $i . "\n";

The loop is always executed at least once if the modifier is
'while' or 'until' and the statement is 'do'. Otherwise the
test is performed first.

Rob






-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to