Online Learning Applications for Technical English


Home
Syllabus
Assignments

Instructor



Producing Homepages

The tr (transliteration) function will rewrite a set of characters with another set. The format is:
  tr/current character set/new character set/;
For example:
  $input =~ tr/+/ /;        # replace all plus signs
                            #  in $input with spaces
  $answer =~ tr/a-z/A-Z/;   # change all lowercase letters
                            #  in $answer to uppercase

will replace all plus signs in $input with a space.

[ Back ]