Problem with a regex?by TStanley (Canon)
|on Jul 15, 2011 at 16:34 UTC||Need Help??|
TStanley has asked for the
wisdom of the Perl Monks concerning the following question:
I have a large report that I need to extract data from. The report can be broken down into records, with the start of each one looking similar to what is below:
I am using the following code to split the file out into the separate stores, but it splits out into two elements, with element 0 of the array being empty, and everything else within element 1:
One thing that I noticed is that when viewing the input file in vi (I am doing this on a HP-UX system), there is a ^L character at the start of each store, with the exception of the first one, so my guess is that the first part of the regex is incorrect. As always, suggestions/hints are welcome.
People sleep peaceably in their beds at night only because rough men stand ready to do violence on their behalf. -- George Orwell