in reply to Re: Re: Help with null string behavior in regex?
in thread Help with null string behavior in regex?
I hoped that what I was doing was clear enough. The real improvements were doing a chomp() on the whole list at once, only once, removing any empty elements, then pre-compiling all the patterns.
I also changed your for ( ... ) { unless ( ... ) { ...; last } } because it read strangely for me. unless() is like that, sometimes it just reads strangely. Since the intent of that code was to be an "everything matches or I print the file name" I just skipped right to the next pattern if there was a match and made the exception stand out.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Help with null string behavior in regex?
by McMahon (Chaplain) on May 03, 2004 at 23:53 UTC | |
by diotalevi (Canon) on May 04, 2004 at 00:06 UTC |