#!/usr/local/bin/perl -w use strict; use constant TESTVALUE => 1; my %hash1 = (TESTVALUE , "OK"); my %hash2 = (123 => TESTVALUE); my $hashValue; # Try 1 $hashValue = $hash1{1}; # Try 2 $hashValue = $hash1{+TESTVALUE}; # Try 3 $hashValue = $hash1{$hash2{123}}; #### --- print map { my ($m)=1<