good chemistry is complicated,
and a little bit messy -LW
This should be easy: counting letters in a stringby Anonymous Monk
|on Jan 31, 2006 at 11:23 UTC||Need Help??|
Anonymous Monk has asked for the
wisdom of the Perl Monks concerning the following question:
My question is rather silly, but I can't seem to be able to find the solution myself...
I have the array:
and the string:
and I want to find how many times each letter appears in the $string.
I go like:
But it doesn't count anything...
Does it have to do with the $a in the pattern matching?
I tested the same thing and instead of $a I put A or B etc and it works...