The y operator in Perl translates all characters of SearchList into the corresponding characters of ReplacementList.
Here the SearchList is the given input characters which are to be converted into the corresponding characters given in the ReplacementList.
Returns: the translated string
Example 1: This example uses y operator for translating from lower case to upper case.
GFG IS A COMPUTER SCIENCE PORTAL GEEKSFORGEEKS
Example 2: This example uses y operator for translating from upper case to lower case.
gfg is a computer science portal geeksforgeeks
Example 3: This example uses y operator for translating from upper case to numeric form.
656 89 0 29999949 9284924 999909 6449959964499
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.