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


in reply to Re^2: $_ not set in while <>
in thread $_ not set in while <>

Respectfully dissenting here ... I find last if(s) to be quite useful, because you can quite easily have as many of them as you like. Even if (as is quite usually the case ...) the actual "while condition" is a dummy, the series of last if statements which immediately follow it spell-out every one of the possible "exit conditions," one at a time, separately.