tr/i/o/; : tr « Regular Expression « Perl






tr/i/o/;

   

while (<>) {
    tr/i/o/;
    print;
}

   
    
    
  








Related examples in the same category

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/o/i/;