Cody Pendant has asked for the wisdom of the Perl Monks concerning the following question:
<stage-direction>Enter Fred, stage right</stage-direction> <speech>FRED: Hey everyone, what's up?</speech>
or maybe
<stage-direction>Enter Fred, stage right</stage-direction> <speech character="Fred">Hey everyone, what's up?</speech>
and I know that this goes against the "do it properly" ethos, but if I didn't want to use XML, has anybody got any suggestions for an XML-like custom markup which makes flat text files easy to search?
It doesn't have to be case-insensitive or even whitespace-independent, say if it was just:
begin-stage-direction Enter Fred, stage right end-stage-direction
That would be cool. Then it can just be read with some regex/for-loop thing like:
kind of construct.if(/^begin-stage-direction/){ $notice_next_line = 1; }else{ next; }
I know there's a big "why not do it properly in a database" hanging over this, but assuming text files with custom markup, is there a non-stupid way to do this?
--
($_='jjjuuusssttt annootthheer pppeeerrrlll haaaccckkeer')=~y/a-z//s;print;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Poor Man's XML?
by mirod (Canon) on Jun 26, 2002 at 04:07 UTC | |
by stefp (Vicar) on Jun 27, 2002 at 19:08 UTC | |
Re: Poor Man's XML?
by lestrrat (Deacon) on Jun 26, 2002 at 05:16 UTC | |
Re: Poor Man's XML?
by kvale (Monsignor) on Jun 26, 2002 at 04:17 UTC | |
Re: Poor Man's XML?
by graff (Chancellor) on Jun 26, 2002 at 05:01 UTC | |
Re: Poor Man's XML?
by peschkaj (Pilgrim) on Jun 26, 2002 at 04:01 UTC | |
by one4k4 (Hermit) on Jun 26, 2002 at 06:31 UTC | |
Re: Poor Man's XML?
by Popcorn Dave (Abbot) on Jun 26, 2002 at 04:03 UTC | |
Re: (newrisedesigns) Poor Man's XML?
by newrisedesigns (Curate) on Jun 26, 2002 at 04:25 UTC | |
Re: Poor Man's XML?
by brianarn (Chaplain) on Jun 26, 2002 at 16:16 UTC | |
Re: Poor Man's XML?
by Cody Pendant (Prior) on Jun 27, 2002 at 03:20 UTC | |
by rattusillegitimus (Friar) on Jun 27, 2002 at 05:15 UTC | |
A reply falls below the community's threshold of quality. You may see it by logging in. |