This if statement is true whether or not the previous regex matched $. And the regex engine will only match $ once. How does the regex engine know that it matched $? And can I get access to that information? I prefer to not call the regex engine again.
Using pos == length is sufficient. I was hoping there was a simpler call, something like pos() but for identifying whether $ was already matched. That would allow me to avoid two calls (length and pos) and instead call one function (perhaps eos($str)). I'm very sensitive to performance during parsing.
In reply to Re^2: perl indication of end of string already matched
by nachumk
in thread perl indication of end of string already matched
by nachumk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |