tariqahsan has asked for the wisdom of the Perl Monks concerning the following question:
A sample file would look like -
RULE=1
BEGIN
INDICATOR1=BEGIN
A
B
C
INDICATOR1=END
INDICATOR2=BEGIN
E
F
G
INDICATOR2=END
END
RULE=2
BEGIN
INDICATOR1=BEGIN
X
Y
Z
INDICATOR1=END
INDICATOR2=BEGIN
W
U
V
INDICATOR2=END
END
I would like to read the text based on matching RULE and subsequently start reading values when it encounters the BEGIN. It will then store values into certain variables based on the inner INDICATOR markers. It will stop reading the file once it reaches the outer END marker.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reading a part of text file between markers
by Fletch (Bishop) on Mar 28, 2005 at 16:48 UTC | |
|
Re: Reading a part of text file between markers
by manav (Scribe) on Mar 28, 2005 at 16:56 UTC | |
|
Re: Reading a part of text file between markers
by ambs (Pilgrim) on Mar 28, 2005 at 16:48 UTC |