in reply to Not errors but possible bugs

A do { ... } while ( ... ) construct is not the same thing as a while loop. In fact, they're not even considered loop blocks in Perl, so things like next or last are invalid there. Consider re-writing your construct to use a real while ( ... ) { ... } block. The documentation for do is not explicit in this regard, but consider do/while and do/until to be "do" blocks, not a real loop, and then the documentation makes sense and you can see that these are forbidden operations.