Perl – Uppercase to Lowercase Conversion via the Translation Operator

Perl’s translation operator provides a way to substitute one group of characters for another. In the below script I demonstrate how easy it is to use the translation operator to convert standard input from the command prompt from uppercase letters to lowercase. You can also use Perl’s lc() function to accomplish the same thing more easily.

Perl's translation operator

Perl's translation operator


Output:
Uppercase to lowercase via Perl's translation operator

Uppercase to lowercase via Perl's translation operator

This entry was posted in Perl, Programming Languages, Technology and tagged , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


− two = 5