Solved

converting a string to lower case

Posted on 1998-09-09
1
229 Views
Last Modified: 2013-12-25
I have a form which passes a string to a CGI program written in Perl. How do I convert this string to lower case - as it is transferred as a mixture of upper and lower case characters.
0
Comment
Question by:AndrewThomason
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 7

Accepted Solution

by:
bjt3 earned 100 total points
ID: 1828584
Use tr.  For example:

$form_data = "HeRe Is A MixED CaSE StrInG...\n";
$form_data =~ tr/A-Z/a-z/;
print $form_data

generates:
here is a mixed case string...
0

Featured Post

Stressed Out?

Watch some penguins on the livecam!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question