in reply to Re: file wildcards in Win32
in thread file wildcards in Win32

You can skip the $linecounter variable and use "$." (that's a dollar sign followed by a dot). The "dollar dot" variable keeps track of the current input line number.

Also, don't forget to use the /o switch in a regex included in a loop if the regex never changes. This prevents the regex compiler from recompiling the regex every time time it encounters it and will improve program performance.

Nice code, btw.

Replies are listed 'Best First'.
RE: RE: Re: file wildcards in Win32
by buzzcutbuddha (Chaplain) on Jun 17, 2000 at 01:21 UTC
    Two excellent points! I had forgotten about $. and I had used /o in the first regex
    but not in the second. You can tell it's Friday and my mind is elsewhere. Thanks for the insight.