Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: lower case

by btrott (Parson)
on Feb 18, 2000 at 22:57 UTC ( #3699=note: print w/replies, xml ) Need Help??


in reply to lower case

The fact that you said "match" sounds like you're talking about a regular expression... is that the case? If so, you can just say
if ($var =~ /bob/i) { # Bob matches bob }
Or, as the previous poster said, if you're just trying to compare two strings case-insensitively, use
if (lc $var eq "bob") { # Bob matches bob }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://3699]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2017-02-25 13:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (365 votes). Check out past polls.