#!/usr/local/bin/perl -wl use strict; use constant TESTVALUE => 1; my %hash1 = (TESTVALUE() => "OK"); my %hash2 = (123 => TESTVALUE); my $hashValue; print $hash1{1}; print $hash1{+TESTVALUE}; print $hash1{$hash2{123}};