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

That version doesn't do anything until it reaches the first alpha. Is that really what you want?
  • Comment on Re^4: A way to avoid repeated conditional loops

Replies are listed 'Best First'.
Re^5: A way to avoid repeated conditional loops
by Deus Ex (Scribe) on Aug 29, 2011 at 03:44 UTC

    You're right. Was naming the first block of code you wrote as "the squished version". Of course it was not :)

    Actually I've been realizing that there's no way other than using either a regex to test on the evaluated current line or a flag variable. At this point it seems to me the second approach might be the most efficient in computational terms. Many thanks for your help :)