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
Solved

make it lower case.

Posted on 2000-02-15
5
201 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
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
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…

860 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