Re: changing behavior by user command

2002-06-07 Thread Janek Schleicher
David T-G wrote at Fri, 07 Jun 2002 16:45:38 +0200: > I'm not sure about the ignore case... If I read it right, some $pattern will become > "(?i)$pattern". I guess, then, (?i)pat is like /pat/i otherwise? > Yep. The (?i) switches ignorecase in regexes on, while (?-i) switches it off. You coul

Re: changing behavior by user command

2002-06-07 Thread David T-G
Janek, et al -- ...and then Janek Schleicher said... % % Nikola Janceski wrote at Fri, 07 Jun 2002 15:02:22 +0200: % % > perhaps use qr// to "precompile" the search instead and use that new precompiled var within your % > loop so you don't evaluate the if conditions each looptime. ... % % Eve

RE: changing behavior by user command

2002-06-07 Thread Janek Schleicher
Nikola Janceski wrote at Fri, 07 Jun 2002 15:02:22 +0200: > perhaps use qr// to "precompile" the search instead and use that new precompiled var >within your > loop so you don't evaluate the if conditions each looptime. > > my $search; >if ( $WholeMatchOnly ) >{ > if ( $IgnoreCase

Re: changing behavior by user command

2002-06-07 Thread David T-G
Nikola, et al -- ...and then Nikola Janceski said... % % perhaps use qr// to "precompile" the search instead and use that new % precompiled var within your loop so you don't evaluate the if conditions % each looptime. Oh, cool! Thanks! % % my $search; ... Thanks also for the example, since

RE: changing behavior by user command

2002-06-07 Thread Nikola Janceski
perhaps use qr// to "precompile" the search instead and use that new precompiled var within your loop so you don't evaluate the if conditions each looptime. my $search; if ( $WholeMatchOnly ) { if ( $IgnoreCase ) { $search = qr/^\($pattern\)$/i } else { $search = qr/