Thanks for all the responses. I had completely overlooked the 3000 on line
6. Now it all makes sense. There is much to be said for a second pair of
eyes
Peter Cline
Inet Developer
New York Times Digital
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMA
Will this help?
open (INFILE, 'ads.txt' ) or die "Error opening file ($!)";
my @ad_lines = ();
while ( )
{
s/^\s+|\s+$//g; # Chop off leading, trailing space
next unless $_; # Skip empty lines
last if /\/\-+advertisement/;
push( @ad_lines, $_ ) if /^\s*\d+\./;
}
#
> -Original Message-
> From: Peter Cline [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 04, 2002 3:49 PM
> To: [EMAIL PROTECTED]
> Subject: Strange (from my perspective) regex behavior
>
>
> I am trying to extraxt some text from a file using a regular
I am trying to extraxt some text from a file using a regular
expression. It is not behaving as expected and am totally perplexed as to
why.
Here is an excerpt of the text
1. Top Story: Dynegy in Agreement to Get Enron Pipeline
2. M&A: Newmont-Normandy, Hewlett-Compaq, Pax TV, WorldCom
3. Invest
[mailto:[EMAIL PROTECTED]]
Sent: Friday, January 04, 2002 12:49
To: [EMAIL PROTECTED]
Subject: Strange (from my perspective) regex behavior
I am trying to extraxt some text from a file using a regular
expression. It is not behaving as expected and am totally perplexed as to why.
Here is an excerpt
I am trying to extraxt some text from a file using a regular
expression. It is not behaving as expected and am totally perplexed as to why.
Here is an excerpt of the text
1. Top Story: Dynegy in Agreement to Get Enron Pipeline
2. M&A: Newmont-Normandy, Hewlett-Compaq, Pax TV, WorldCom
3. Invest