#!/usr/bin/perl use strict; use warnings; use constant CONST1=>10; use constant CONST2=>12; my %var=( CONST1=>'test1', CONST2=>'test2', ); print $var{CONST1}."\n"; print $var{10}."\n"; #### bash-2.05b$ perl test.pl test1 Use of uninitialized value in concatenation (.) or string at test.pl line 13.