in reply to Re: Side effect of passing matched values by reference
in thread Side effect of passing matched values by reference

Of course - that was the solution I used. My point was just that it wasn't obvious (at least to me) that $1 acts like a global variable in that way...
  • Comment on Re^2: Side effect of passing matched values by reference