in reply to Re^2: Regex: Example works, plugging it into code doesn't.
in thread Regex: Example works, plugging it into code doesn't.
I have removed the extra code
But in doing so, you have also removed the part that actually caused the problem. If I hadn't seen your question before your edit, there wouldn't have been any way for me to identify the problem... :)
Just blindly cutting away code that you think doesn't contribute to the problem, is not what "try to reduce your code further" means...
What it means, is make a temporary copy of your script, and cut away code one chunk at a time, and each time test the remaining code to see if it still reproduces your bug (but is otherwise functional). Then when you've reached the minimal amount of code needed to reproduce the bug, remove file read's and module calls etc. as much as possible, and replace them with in-place definitions of dummy data. Test again, to see if it still reproduces the bug. If it does, that's what you should upload to Perl Monks.
Just for future reference... :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Regex: Example works, plugging it into code doesn't.
by EclecticScion (Novice) on Jun 14, 2013 at 17:53 UTC |