in reply to Re: differences between parsing qr, qq, and q string contents
in thread differences between parsing qr, qq, and q string contents
If you have a group of regex's that you're putting together, it is better to use qr{} instead of using q{} or qq{}. This is because you want to validate each subexpression before it's put into your final regex.But that limits you to using parts that are full patterns themselves.
Getting an error message early on is worth the cost of having to compile the subexpressions once each.So, it's ok to pay a price each and every time code is compiled, just so *debugging* during development may become easier? It also means you're paying the price if you do know your patterns, and write them correct the first time.
It's not a trade-off I will always make in the same direction. In fact, I'd usually make it in the opposite direction than you suggest should always be taken.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: differences between parsing qr, qq, and q string contents
by wind (Priest) on May 02, 2011 at 02:17 UTC | |
by JavaFan (Canon) on May 02, 2011 at 09:16 UTC |