in reply to count special character

On the command line, type
perldoc -q count

And amazingly, it will answer your question. See also: perlfaq4.

Perl 6 - links to (nearly) everything that is Perl 6.

Replies are listed 'Best First'.
Re^2: count special character
by bharatbsharma (Acolyte) on Aug 18, 2010 at 10:48 UTC
    I think i have got the answer
    $count = ($string =~ tr/\"//); print "There are $count [\" ] characters in the string";