|more useful options|
How do I extract this data structure?by HamNRye (Monk)
|on Dec 09, 2000 at 21:37 UTC||Need Help??|
HamNRye has asked for the
wisdom of the Perl Monks concerning the following question:
Hello, I work for a newspaper and we are trying to generate a page report from our classified system. We plan to do this by parsing the "PIL" file that calls all of the elements for pagination.
I need to get all of the "object" sections out of a file, and they are multi-line sections.
The file starts with a line like so:
Then there is a section that defines the path to the EPS's that make up the section:
Next section sets up the page dims:
And the we have "object" sections for each element:
And these repeat for each ad on the page. How would I get each of these object sections?? I would like to store them in a hash called %object and key them by the "id" field in the object section. I also will need to store the object origin and dimension.
I know this must seem simple to many of you, but I don't really understand stepping through a file and getting this all out. Thanks for any help. (Didn't see this in TFM, but i might just not know where to look...) ~HamNRye