Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I don't think it should be a question of refactoring the regexes. Instead, you should refactor the part that involves using "substr" in the first place.
Why are you using substr at all? There seems to be no need to do that, and if you don't use it, you'll only need the one regex (the first one) -- unless of course the data turns out to be malformed in some way. But I would agree with the suggestion to use modules for this. In the long run, you'll be glad you did. In reply to Re: Refactoring Regular Expressions
by graff
|
|