http://qs321.pair.com?node_id=1211399


in reply to Use of 'last' within single-line while loops

In my humble opinion I would suggest the use of labels with last and next in the case of nested loops to make sure the reader of the code (if not the Perl interpreter) is not confused about the intended logic.

use strict; use warnings; OUTER: while( 1 ) { last OUTER while (1); print "Done with INNER.\n" } print "Done with OUTER.\n"