This is a discussion on Re: DNS Perl Help? [ot] - SpamAssassin ; 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 ...
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
Wolfgang Hamann