Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Ignore Case when comparing Hash Keys

by JavaFan (Canon)
on Nov 15, 2010 at 18:55 UTC ( [id://871541]=note: print w/replies, xml ) Need Help??


in reply to Ignore Case when comparing Hash Keys

Your description talks about comparing values, but your code doesn't. Also, comparing keys while ignoring case doesn't make the matching unique. What should the output be if
%hash1 = ("John", 43, "jOHn", 42, "JOHN", 41); %hash2 = ("john", 42);

Replies are listed 'Best First'.
Re^2: Ignore Case when comparing Hash Keys
by avidcoder (Novice) on Nov 15, 2010 at 19:01 UTC
    Thanks you for your response. You are right. But I am not comparing names in my code but I am comparing the Config attributes where we will always have unique names. For simplicity I just put the names in the example above.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-19 14:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found