![]() |
|
Think about Loose Coupling | |
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
does not compile, since the do does not know anything about the while. So it compiles just fine. What is not working, though, is the last. This is because the block introduced with do is neither a loop nor a bare block. Your statement is basically equivalent in structure to print foo while bar. What you can do instead is a bare block, because you can use next, last, redo on a bare block:
-- Hofmator Code written by Hofmator and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk. In reply to Re: last in a do while loop
by Hofmator
|
|