tr « Regular Expression « Perl






1.Counting using tr.
2.$text =~ tr/a-z/d-za-c/;
3.$text =~ tr/d-za-c/a-z/;
4.Using tr to count the occurrences of specific characters.
5.Using tr to retrieve the length of a string.
6.tr/a-z/A-Z/
7.tr/i/o/;
8.tr/o/i/;