Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^4: Can we make hash key check in 'if' condition case insensitive?

by pryrt (Priest)
on Feb 09, 2018 at 17:26 UTC ( #1208845=note: print w/replies, xml ) Need Help??


in reply to Re^3: Can we make hash key check in 'if' condition case insensitive?
in thread [SOLVED: Can we make hash key check in 'if' condition case insensitive?

Change the map line to my %hash = map { fc $_, 1 } @castaways;, so that the hash keys are already folded, and I get:
John is a castaway JANE is a castaway luke is a castaway

Replies are listed 'Best First'.
Re^5: Can we make hash key check in 'if' condition case insensitive?
by Perl300 (Pilgrim) on Feb 09, 2018 at 19:15 UTC

    Thank you ikegami, pryrt and poj. I learned something new again.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2018-02-18 09:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (253 votes). Check out past polls.

    Notices?