in reply to Re: A way to avoid repeated conditional loops
in thread A way to avoid repeated conditional loops

I wonder whether the copying of some code #2 is worth the avoidance of the test. Another way of writing it, with the same duplication:
while (<FILE>) { if (/alpha/) { some code #1; while (<FILE>) { some code #2; } } else { some code #2; } }