• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 224
  • Last Modified:

make it lower case.

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
MAXcom
Asked:
MAXcom
  • 3
1 Solution
 
RobWMartinCommented:
$email=~tr/[A-Z]/[a-z]/;
$passwd=~tr/[A-Z]/[a-z]/;
0
 
RobWMartinCommented:
or...
$email=lc($email);
$passwd=lc($passwd);
0
 
abelCommented:
#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
 
MAXcomAuthor Commented:
looks good to me. thanks
0
 
RobWMartinCommented:
Further...
$email = lc $query->param('email');
$passwd = lc $query->param('password');

Aren't choices wonderful!

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now