package Insensitive::Hash; use strict; use warnings; # new -> TIEHASH # get -> FETCH # set -> STORE sub TIEHASH { my ( $class, @args ) = @_; my %self; while ( my ($key, $value) = splice @args, 0, 2 ) { $self{ lc $key } = $value; } bless \%self, $class; } sub FETCH { my ( $self, $key ) = @_; $self->{ lc $key }; } sub STORE { my ( $self, $key, $value ) = @_; $self->{ lc $key } = $value; } 1;