Keep It Simple, Stupid | |
PerlMonks |
Re: Faster way to do this?by fishmonger (Chaplain) |
on Nov 12, 2015 at 16:30 UTC ( [id://1147586]=note: print w/replies, xml ) | Need Help?? |
You can also use the tr operator. my $count = $string =~ tr/M//;
In Section
Seekers of Perl Wisdom
|
|