Yeh, unfortunately many of the rcords exceed one line which is one thing
that is causing me problems. I still remain mystified by this and many other
things....

Record1:
<H1>whatever.....
<H2>whatever.....
<H3>whatever.....
whatever continued...
<H4>whatever.....
<p>whatever.....
 
Record2:
<H2>whatever.....
<H3>whatever.....
<H4>whatever.....
<p>whatever.....
whatever continued...

> -----Original Message-----
> From: Janek Schleicher [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 19, 2002 11:47 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Record Separation
> 
> 
> Kurt Faymon wrote at Thu, 19 Sep 2002 14:44:02 +0200:
> 
> > Given the Input of:
> > 
> > <H1>whatever.....
> > <H2>whatever.....
> > [...]
> > 
> > How can I read in the records bases on 'blocks starting 
> with <H,, that is
> > grouped as follows:
> > 
> > Record1:
> > <H1>whatever.....
> > <H2>whatever.....
> > <H3>whatever.....
> > <H4>whatever.....
> > <p>whatever.....
> > 
> > Record2:
> > <H2>whatever.....
> > <H3>whatever.....
> > <H4>whatever.....
> > <p>whatever.....
> > 
> > [...]
> > 
> > Setting $/ to something? Use the Split function? having 
> tried variations of
> > these and/or postive and negative lookahead's have left me 
> obviously missing
> > something? Any ideas?
> 
> If these are really lines,
> you could do something tricky:
> 
> my @record = ([]); # Initialize with an empty first record at 
> the beginning
> while (<>) {
>    push @{$record[-1]};
>    /^<p>/ and push @record, [];
> }
> 
> 
> Best Wishes,
> Janek
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to