Home: Perl Programming Help: Intermediate:
-e Case Insensitive



andy7t
User

Dec 24, 2003, 7:56 AM


Views: 1665
-e Case Insensitive

Hi,

How would i get:

if(-e "file.txt")

to be case-insensitive.

ie. if(-e "FiLe.txt") if(-e "fIle.Txt")

etc

I'm trying to stop users entering multiple email addresses on my site, but users are abusing the system by having email addresses like HelOo@hotmAil.com, and the next time they signup they could have hEloo@HotmaIL.CoM.

Thanks


(This post was edited by andy7t on Dec 24, 2003, 7:59 AM)


Recall
Novice

Dec 25, 2003, 12:44 PM


Views: 1659
Re: [andy7t] -e Case Insensitive

Use lowercase emails then use:



if (-e lc($address)) {