in reply to Re^2: Perl store as variables regex matches for use outside of loop.
in thread Perl store as variables regex matches for use outside of loop.

Yes, 1nickt, you're absolutely right, we have to be quite careful about these things nowadays. I am not dealing too often with Unicode or UTF8 data, and mostly with pure ASCII or sometimes with an extended ASCII Latin character set, so that I don't always think about the possibility of character classes matching more than I usually expect. Thank you for reminding.

Having said that, I was not presenting production code, not even a complete working program, but just trying to identify some of the errors in the OP code and show some ways to correct them.

  • Comment on Re^3: Perl store as variables regex matches for use outside of loop.