What have you tried so far?
For starters, perlfaq4 and perlfaq5 contain examples of how to count substrings/characters, and perllol introduces you to arrays of arrays, which you'll probably need to create a matrix.
In reply to Re: Creating Frequency Matrix
by moritz
in thread Creating Frequency Matrix
by Nora
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |