![]() |
|
Just another Perl shrine | |
PerlMonks |
Re: Counting Substrings in Stringsby pschoonveld (Pilgrim) |
on Dec 02, 1999 at 12:03 UTC ( #1028=note: print w/replies, xml ) | Need Help?? |
$count = $string =~ tr/x/x/;
Will make $count = num of x's in $string.
In Section
Seekers of Perl Wisdom
|
|