Solved

make it lower case.

Posted on 2000-02-15
5
215 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 50 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

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 …
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
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

695 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