On Wednesday 28 November 2007 14:05, Giuseppe.G. wrote:
>
> On 28 Nov, 01:44, [EMAIL PROTECTED] (Jeff Pang) wrote:
> >
> > Just show another way to do it.
> >
> > use strict;
> >
> > local $/="\n\n";
> > while() {
> > next unless /^DOC-START\n(.*?)\nDOC-END$/sm;
> > my $content = $1;
> >
On 28 Nov, 01:44, [EMAIL PROTECTED] (Jeff Pang) wrote:
> Hello,
>
> Just show another way to do it.
>
> use strict;
>
> local $/="\n\n";
> while() {
> next unless /^DOC-START\n(.*?)\nDOC-END$/sm;
> my $content = $1;
> parse($content);
>
> }
Thank you all for your answers. In particula
On Tuesday 27 November 2007 11:29, Giuseppe.G. wrote:
> Hello there.
Hello,
> I'm a real beginner and I was wondering if you could be
> so kind to help me on this.
> I have a text file, containing a number of varying length documents,
> all tagged with DOC-START and DOC-END, structured as follows
Hello,
Just show another way to do it.
use strict;
local $/="\n\n";
while() {
next unless /^DOC-START\n(.*?)\nDOC-END$/sm;
my $content = $1;
parse($content);
}
sub parse {
my $c = shift;
print length($c),"\n";
}
__DATA__
DOC-START
content of the document
DOC-END
DOC-START
On 11/27/07, Giuseppe.G. <[EMAIL PROTECTED]> wrote:
> I have a text file, containing a number of varying length documents,
> all tagged with DOC-START and DOC-END, structured as follows:
>
>
> DOC-START
> content of the document
> DOC-END
> I need to take every document and pass it to a parsing f
Hello there. I'm a real beginner and I was wondering if you could be
so kind to help me on this.
I have a text file, containing a number of varying length documents,
all tagged with DOC-START and DOC-END, structured as follows:
DOC-START
content of the document
DOC-END
DOC-START
some text
DOC-EN