in reply to DateTime::Format::Flexible; for Log Parse with multiple formatted lines
It appears that you are not only reading in all the lines of the file at once, but then combining them all into one string. This is probably not a scalable solution.
Instead consider using while to go through the lines one at a time, processing the text and extracting the data you need in a loop.
The other thing I saw at a glance is that you are trying to use $0 as a regex capture, which will not do what you expect.
Edit: Also please place your sample input into <code></code> tags, as it's not rendering accurately at the moment and can't be used for testing. Please consider sharing an SSCCE which in this case would include a couple of sample lines in the __DATA__ section, the regexp you're using to extract the fields, and then the date handling code ... all in one script of 20 - 30 lines.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DateTime::Format::Flexible; for Log Parse with multiple formatted lines
by TCLion (Novice) on Mar 23, 2017 at 19:48 UTC | |
by Marshall (Canon) on Mar 23, 2017 at 22:08 UTC | |
by 1nickt (Canon) on Mar 23, 2017 at 21:39 UTC |