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

The OP code has an else condition on the match for alpha. That should execute for every line of the file except the 'alpha', regardless of before or after.

  • Comment on Re^5: A way to avoid repeated conditional loops