#!/usr/bin/perl use strict; use warnings; use constant FOO => 3; my %hash = (3 => 'Hallo'); print $hash{FOO};