Forget the last, here's the right one Re: real stupid matching question

2001-08-31 Thread Bas Bloemsaat
> > while ( $oneline =~ /(-{3,})/ ) why don't you use this:? $oneline =~ /---/ It's more readable (I think), it's shorter, and if you don't care about the number of -'s, faster too. Now I do realize that doesn't matter in this case, but still... -- To unsubscribe, e-mail: [EMAIL PROTE

Re: real stupid matching question

2001-08-31 Thread Bas Bloemsaat
- Original Message - From: "Michael Fowler" <[EMAIL PROTECTED]> To: "Matt Fuerst" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, August 31, 2001 9:22 PM Subject: Re: real stupid matching question > On Fri, Aug 31, 2001 at 02:21:56PM -

Re: real stupid matching question

2001-08-31 Thread Michael Fowler
On Fri, Aug 31, 2001 at 11:22:18AM -0800, Michael Fowler wrote: > > $oneline = ; > > while ( $oneline =~ /(-{3,})/ ) > > { > > # process one line > > $oneline = ; > > } I take back my statement that it is working. It's working as implemented, but not as intended. The code you ha

Re: real stupid matching question

2001-08-31 Thread Michael Fowler
On Fri, Aug 31, 2001 at 02:21:56PM -0400, Matt Fuerst wrote: > I am opening a file witht he following command: > > open (LOGFILE, "100.txt"); Where is your "|| die(...)"? > $oneline = ; > while ( $oneline =~ /(-{3,})/ ) > { > # process one line > $oneline = ; > } will evalua

Re: real stupid matching question

2001-08-31 Thread Brad
Hi Matt, Note that your while() condition needs !~ instead of =~ (and I don't think the ',' is necessary in the '-{3,}' regex). Otherwise, the code worked for me except when I passed it an empty file. Try testing the value of $oneline before you enter the while loop. -- Brad > I am opening a f