Perl Monk, Perl Meditation | |
PerlMonks |
Re: Counting Substrings in Stringsby pschoonveld (Pilgrim) |
on Dec 02, 1999 at 12:03 UTC ( [id://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
|
|