use Tie::IxHash; tie my %hash, 'Tie::IxHash', one => 1, two => 2; print "$hash{two}\n"; # prints "2"