Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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?

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2015-08-29 08:00 GMT
Find Nodes?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...

    Results (343 votes), past polls