Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

make it lower case.

Posted on 2000-02-15
5
Medium Priority
?
220 Views
Last Modified: 2010-03-05
Here is my script so far:

#!/usr/bin/perl
use CGI;

$query= CGI->new();
$email = $query->param('email');
$passwd = $query->param('password');

print "Content-type: text/html\n\n";


as you see, im taking an email and a password from a form submitted by the user. How do I make $email and $passwd lower case as a standard?
0
Comment
Question by:MAXcom
[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
  • 3
5 Comments
 
LVL 3

Expert Comment

by:RobWMartin
ID: 2523984
$email=~tr/[A-Z]/[a-z]/;
$passwd=~tr/[A-Z]/[a-z]/;
0
 
LVL 3

Accepted Solution

by:
RobWMartin earned 200 total points
ID: 2523990
or...
$email=lc($email);
$passwd=lc($passwd);
0
 
LVL 39

Expert Comment

by:abel
ID: 2523993
#try using the lc (lowercase) function:
$email = lc($email);
$passwd = lc($passwd);

#or simply
$email = lc($query->param('email'));
$passwd = lc($query->param('password'));

if that is what you mean. Unless you mean something else with "standard"?

Greetz,
Abel

0
 

Author Comment

by:MAXcom
ID: 2523995
looks good to me. thanks
0
 
LVL 3

Expert Comment

by:RobWMartin
ID: 2524001
Further...
$email = lc $query->param('email');
$passwd = lc $query->param('password');

Aren't choices wonderful!

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

636 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