in reply to Re: breaking a text file into a data structure -- best way?
in thread breaking a text file into a data structure -- best way?
Thanks for the response, but you misunderstood my task. The 'a>', 'b>', 'c>' are not really present in the text file. I included them as "line numbers" to illustrate where I wanted the text split up. In the specific case I presented, the text is split up at the line *before* the line that starts with '======'.
In any case, I am curious about a general approach to such problems, and at first glance, it seems that a state machine approach would help me. However, I got stuck with that as well, especially since my splitting markers are not *in* the line where I want to split the text, but *after* the line on which I want to split.
--
when small people start casting long shadows, it is time to go to bed
when small people start casting long shadows, it is time to go to bed
In Section
Seekers of Perl Wisdom