This is a multi-part message in MIME format.
--------------050600080308050306030804
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit



Theo Van Dinter wrote:
> On Sun, Jul 22, 2007 at 07:15:50AM -0000, hamann.w@t-online.de wrote:
>
>> Mark Perkel wrote:
>> If I have a string, what's that fastest way to count the number of
>> periods in the string?
>>
>> in perl, I would probably split the string at the periods
>>
>> @parts = split /\./, $string;
>> and then just use the number of splits
>> $#parts
>>

>
> I believe the official/fastest/shortest method is:
>
> $count = $string =~ y/.//;
>
>


OK - Thanks for your help on that one, Still need the DNS stuff figured
out, That's the last piece in what will be an extrodinarilly powerful
whitelisting system. I'll publish the code once it is tested. I think a
lot of people will want to use it and improve it.


--------------050600080308050306030804
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit











Theo Van Dinter wrote:

On Sun, Jul 22, 2007 at 07:15:50AM -0000, hamann.w@t-online.de wrote:


Mark Perkel wrote:
If I have a string, what's that fastest way to count the number of
periods in the string?

in perl, I would probably split the string at the periods

@parts = split /\./, $string;
and then just use the number of splits
$#parts



I believe the official/fastest/shortest method is:

$count = $string =~ y/.//;





OK - Thanks for your help on that one, Still need the DNS stuff figured
out, That's the last piece in what will be an extrodinarilly powerful
whitelisting system. I'll publish the code once it is tested. I think a
lot of people will want to use it and improve it.






--------------050600080308050306030804--