Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
"be consistent"
 
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 }


Comment on Re: lower case
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://3699]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2014-04-17 00:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (437 votes), past polls