Does 'last' officially not work with single-line while loops like the above?

From Statement Modifiers in perlsyn:

Note also that the loop control statements described later will *NOT* work in this construct, because modifiers don't take loop labels. Sorry. You can always put another block inside of it (for "next") or around it (for "last") to do that sort of thing.   [examples follow]

Are single-line while loops like the one above considered bad programming practice in general?

Not by me. "Statement modifiers" can, in general, be quite useful IMHO.

Update:

Shouldn't my single-line while loop with 'last' be flagged at least as a warning, given that the last statement doesn't apply to the loop it is used within?
Again IMHO, last is clearly block-oriented and should not elicit a warning.
Is there any higher level of warning that can be enabled to catch things like this?
Not to my knowledge. Maybe see perltidy.


Give a man a fish:  <%-{-{-{-<


In reply to Re: Use of 'last' within single-line while loops by AnomalousMonk
in thread Use of 'last' within single-line while loops by Special_K

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.