http://www.perlmonks.org?node_id=582081


in reply to Re: last in a do while loop
in thread last in a do while loop

Mmhh, I know this is just copy and pasted code, but it makes me wonder anyway - is it just me or is the code for the last example slightly strange?
LOOP: { do { last if $x = $y**2; # do something here } while $x++ <= $z; }

-- 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.

Replies are listed 'Best First'.
Re^3: last in a do while loop
by davorg (Chancellor) on Nov 03, 2006 at 13:48 UTC

    I was thinking exactly the same things as I was writing the post. I foresee a couple of patches being sent to the maintainers.

    --
    <http://dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg