{"id":3440,"date":"2012-01-04T22:49:17","date_gmt":"2012-01-05T04:49:17","guid":{"rendered":"http:\/\/humairahmed.com\/blog\/?p=3440"},"modified":"2012-01-05T23:48:40","modified_gmt":"2012-01-06T05:48:40","slug":"perl-uppercase-to-lowercase-conversion-via-the-translation-operator","status":"publish","type":"post","link":"https:\/\/humairahmed.com\/blog\/?p=3440","title":{"rendered":"Perl &#8211; Uppercase to Lowercase Conversion via the Translation Operator"},"content":{"rendered":"<div class=\"twttr_buttons\"><div class=\"twttr_twitter\">\n\t\t\t\t\t<a href=\"http:\/\/twitter.com\/share?text=Perl+-+Uppercase+to+Lowercase+Conversion+via+the+Translation+Operator\" class=\"twitter-share-button\" data-via=\"\" data-hashtags=\"\"  data-size=\"default\" data-url=\"https:\/\/humairahmed.com\/blog\/?p=3440\"  data-related=\"\" target=\"_blank\">Tweet<\/a>\n\t\t\t\t<\/div><\/div><p>Perl&#8217;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&#8217;s lc() function to accomplish the same thing more easily. <!--more--> <br \/><div id=\"attachment_3441\" style=\"width: 283px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/humairahmed.com\/blog\/wp-content\/uploads\/2012\/01\/perl_translate_code.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3441\" src=\"http:\/\/humairahmed.com\/blog\/wp-content\/uploads\/2012\/01\/perl_translate_code.png\" alt=\"Perl&#039;s translation operator\" title=\"Perl&#039;s translation operator\" width=\"273\" height=\"166\" class=\"size-full wp-image-3441\" \/><\/a><p id=\"caption-attachment-3441\" class=\"wp-caption-text\">Perl&#039;s translation operator<\/p><\/div> <br \/> <strong><u>Output:<\/u><\/strong> <br \/> <div id=\"attachment_3446\" style=\"width: 243px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/humairahmed.com\/blog\/wp-content\/uploads\/2012\/01\/perl_translate_output.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3446\" src=\"http:\/\/humairahmed.com\/blog\/wp-content\/uploads\/2012\/01\/perl_translate_output.png\" alt=\"Uppercase to lowercase via Perl&#039;s translation operator\" title=\"Uppercase to lowercase via Perl&#039;s translation operator\" width=\"233\" height=\"39\" class=\"size-full wp-image-3446\" \/><\/a><p id=\"caption-attachment-3446\" class=\"wp-caption-text\">Uppercase to lowercase via Perl&#039;s translation operator<\/p><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Perl&#8217;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 &hellip; <a href=\"https:\/\/humairahmed.com\/blog\/?p=3440\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[382,5,3],"tags":[976,974,972,977,978,386,567,970,975,971,968,969,973],"class_list":["post-3440","post","type-post","status-publish","format-standard","hentry","category-perl","category-programming","category-technology","tag-code","tag-conversion","tag-convert","tag-lc","tag-lc-function","tag-perl-2","tag-perl-code","tag-substitute","tag-substitute-group-of-characters","tag-substitution","tag-translation","tag-translation-operator","tag-uppercase-to-lowercase"],"_links":{"self":[{"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3440"}],"version-history":[{"count":21,"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3440\/revisions"}],"predecessor-version":[{"id":3485,"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3440\/revisions\/3485"}],"wp:attachment":[{"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3440"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}