http://www.perlmonks.org?node_id=943099


in reply to Can any Perl Monk help me to correct the mistake in counting motifs in a string in the perl program written by me?

You have a space between the = and the ~ just before tr on line 38. The ~ is an operator on its own, so perl thinks you are doing an assignment.

That's only your first issue though...