in reply to Program enters infinite loop, can you see why?

Each pass, the interpolation creates a new scalar to match against. Since the scalar has never been matched against, the match starts from the beginning of the string.

It's an easy mistake to make, especially since string literals don't look like functions.

  • Comment on Re: Program enters infinite loop, can you see why?

Replies are listed 'Best First'.
Re^2: Program enters infinite loop, can you see why?
by raybies (Chaplain) on Dec 07, 2010 at 13:33 UTC
    (Ray's lightbulb comes on.) Thanks Ikegami! This explanation makes best sense.