I don't understand what you did in that example that I didn't do
already...there was a script sample underneath the HTML that does what
you're showing, I'm having trouble with the multi line matching and other
than changing $/ (which I did), I don't see anything different...

-----Original Message-----
From: Andrew Brosnan [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 29, 2003 1:45 PM
To: Scot Robnett; [EMAIL PROTECTED]
Subject: RE: Another regex question


On 5/29/03 at 12:27 PM, [EMAIL PROTECTED] (Scot Robnett) wrote:


Will the file always be formated as below (with the blank line between
articles)? If so you could set the record separator '$/' to paragraph
mode to read each of them in:

# $/;       #default is newline
# $/ = "";  # paragraph mode (blank line)
# undef $/; # slurp mode (the whole file)

my @ary;

while (<FH>) {
    $/ = "";
    push @ary, $_;
}

foreach my $thingie(@ary)  {
    #do something with $thingie
}


btw - call subs like:
sub_name();

> ####### HTML file #######
> ...
> <p align="center"><strong>Today's Headlines:</strong>
>
> <br wp="br1"><br wp="br2">
> <br wp="br1"><br wp="br2">
> <p><strong>Story Tag Line</strong> blah blah blah story blah blah
> blah story blah blah blah story blah blah blah story blah blah blah
> story blah blah blah story  blah blah blah story blah blah blah story
> blah blah blah story.
>
> <br wp="br1"><br wp="br2">
> <br wp="br1"><br wp="br2">
> <p><strong>Story Tag Line</strong> blah blah blah story blah blah
> blah story blah blah blah story blah blah blah story blah blah blah
> story blah blah blah story  blah blah blah story blah blah blah story
> blah blah blah story.
>
> <br wp="br1"><br wp="br2">
> <br wp="br1"><br wp="br2">
> <p><strong>Story Tag Line</strong> blah blah blah story blah blah
> blah story blah blah blah story blah blah blah story blah blah blah
> story blah blah blah story  blah blah blah story blah blah blah story
> blah blah blah story.
>
> ####### /HTML file #######

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

Reply via email to