in reply to Counting how many times a character is in a string.

Simply do the following

my $count = $str =~ tr/%//; print "pcount: $count\n";

Prasad