At 07:45 PM 10/12/00 +0200, Robin Berjon wrote:
>At 10:28 12/10/2000 -0700, Bill Moseley wrote:
>>I have a spinning mod_perl process. I installed a
>> $SIG{USR2} = \&Carp::confess;
>>handler and it pointed to this line:
>> $cnt++ while $query->{query} =~ /(?:^|\s)[("]*\S$size\*/g;
>
>I have no idea why your httpd is spinning, however without taking into
>account all that your regexp does, wouldn't an adaptation of the following
>work as well (thus avoiding the regex causes spinning problem) :
>
>$cnt = scalar grep /\*/, split(/\s+/, $query->{query});
Oh, sorry. I'm trying to count up how many words that end in "*" there
are, but grouped by number of letters before the "*".
query = 'a* and "b* aa*" or (bbb* or foo)'
So there are two single char wilds, one double char, and one three letter
wild.
I'll try using split instead because it's probably the /g that's causing
the problem.
Thanks,
Bill Moseley
mailto:[EMAIL PROTECTED]