Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: On creating hash whose keys aren't case-sensitive

by anazawa (Scribe)
on Feb 18, 2012 at 16:29 UTC ( #954765=note: print w/replies, xml ) Need Help??


in reply to Re: On creating hash whose keys aren't case-sensitive
in thread On creating hash whose keys aren't case-sensitive

Thanks for your suggestion. Tie::Hash::Regex interests me. I confirmed your regex passed the following test:
# tie_hash_regex.t use strict; use Tie::Hash::Regex; use Test::Simple tests => 8; my @keys = qw( content-length content_length -content-length -content_length Content-Length Content_Length -Content-Length -Content_Length ); for my $key ( @keys ) { my %hash; tie %hash, 'Tie::Hash::Regex'; $hash{ $key } = 1234; ok $hash{'^(?i:-?content[_-]length)$'} == 1234; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://954765]
help
Chatterbox?
[shmem]: Corion: very clear case of missing sequence number
[Corion]: shmem: Yeah. I guess they have a sequence number but distribute the events across threads or machines or whatever.
[karlgoethebier]: choroba: another chapter of "Learning English At The Monastry"?
[shmem]: Corion, well then... next issue, sequence number not a shared resource :P
[Discipulus]: shmem i'm searching it.. but failing i was sure was in Re: Let's Make PerlMonks Great Again! -- suggestions and dreams
erix recommends Vanished Kingdoms
[Corion]: shmem: Yeah, something like that. Not that that would be a solved issue. Simply process all events that come in from a single interface sequentially. Ah well.
[Discipulus]: their

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (11)
As of 2017-05-23 08:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?