in reply to Retrieving meta information from txt
Instead of first searching and then looking for the tag you could read the file so that you already have separated each text and its tag
For example you can change $/ to "<text>" so that when you read that file, you read it not line by line, but text by text.
Or just parse line by line and store into a new index of an array whenever a line begins with '<text>'. Have an array for the tags and an array for the texts where corresponding tag and text have the same index and you have all the information "finely sliced at your fingertips" ;-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Retrieving meta information from txt
by Anonymous Monk on Dec 10, 2010 at 13:30 UTC |