This is a public message board, why would I send a solution to you without it being available to other monks to learn from? (and me to show off with of course)
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?
From perldoc perlop and searching for transliteration we discover that
So that may be part of your issue, or at least it will be when you remove the g modifier which makes no sense with athe tr opperator
Because the transliteration table is built at compile time, neither th
+e SEARCHLIST nor the REPLACEMENTLIST
are subjected to double quote interpolation. That means that if you w
+ant to use variables,
you must use an eval():
die $@ if $@;
print "Good ",qw(night morning afternoon evening)[(localtime)/6]," fellow monks."