Solved

converting a string to lower case

Posted on 1998-09-09
1
214 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
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

920 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now