On Thu, Feb 10, 2005 at 07:39:54AM -0800, David Storrs wrote:
: Given that Perl 6 won't support an actual do-while loop a la C++ (and
: yes, I know that Perl5 didn't either), how would you accomplish that?
: That is, I'd like to have a loop that runs once, then checks its
: condition to see if it should repeat and continues to repeat as long
: as the condition is true.
:
: I don't think this works, but here's what I'm look for:
:
: {
: $foo = readline;
: ...do stuff with $foo...
: } while ( $foo );
That's spelled
loop {
$foo = readline;
...do stuff with $foo...
} while ( $foo );
these days.
Larry