Thakur has asked for the wisdom of the Perl Monks concerning the following question:
I am confused about the behavior of the keyword 'last' in inner while loop. Suppose I have a while loop inside another while loop and I have used the keyword 'last' to come out of inner while loop. Will I exit the outer while loop too.Also can I use last for foreach loop.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Keyword last for loops
by toolic (Bishop) on Jan 17, 2012 at 19:52 UTC | |
|
Re: Keyword last for loops
by TomDLux (Vicar) on Jan 18, 2012 at 02:19 UTC | |
|
Re: Keyword last for loops
by ikegami (Patriarch) on Jan 18, 2012 at 06:46 UTC | |
|
Re: Keyword last for loops
by planetscape (Chancellor) on Jan 18, 2012 at 09:06 UTC |