It's probably not such a wonderful idea to change the input record separator in the middle of the loop, twice. You're confusing yourself doing that. Plus the changes are falling out of scope before the next iteration anyway.
Here's what you're reading into $_ on each iteration: First iteration: $_ = <a>a,\n. Then partway into the iteration, you change the input record separator, but it doesn't matter because you've already read your first line of data. Then a little further into the loop you change the input record separator again, and again it makes no difference since you already read the line of data. Then your localization of $/ falls out of scope, and the input record separator reverts back to "\n".
Now you read in b</a>\n. And so on.
Dave
In reply to Re^3: trying to do a simple search
by davido
in thread trying to do a simple search
by texuser74
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |