in reply to Re^2: parsing text file
in thread parsing text file
We don't do your job, though it looks as though MidLifeXis is doing your managers.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: parsing text file
by doubledecker (Scribe) on Jun 06, 2011 at 10:16 UTC | |
Sorry that I could not post the whole code Here is the thing I've tried out. Problem is that I'm unable to match the Numbers inside the data. Please suggest the best way to do this
| [reply] [d/l] |
by Sandy (Curate) on Jun 06, 2011 at 20:29 UTC | |
A number of things. One: $data has not been defined. I think you want to look at $chunks[$index] Two: The indices for @chunks goes from 1 to @chunks-1. So be careful! Three: In your regular expression, you have captures within captures. Note that (abc(def)(ghi))(xyz) will match the following: So, most of the time, your $5 returns undef. Four: I am uncertain if you know what it is that you are matching. See the following code and results. It will show what you are matching, and what you could be matching if you used a simpler regex. I don't know if this is what you want, but it should get you started in the right direction. Code Results Good luck! | [reply] [d/l] [select] |