in reply to Counting Substrings in Strings
$count = $string =~ tr/x/x/;
Will make $count = num of x's in $string.
|
---|
In Section
Seekers of Perl Wisdom
in reply to Counting Substrings in Strings
|
---|