it is the list context in the @t1 = ... m//g which gives you multiple results for just that single match. I does, however, not create a loop.
That's why it doesn't work in your while loop. $1 and $2 get filled only once, because without the list context, that's what the matching operator m does in those cases.
Update: Wrong thought, obviously.In reply to Re: backreference question.
by Happy-the-monk
in thread backreference question.
by Qiang
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |