use strict; use warnings; my %g_tun = qw( R1 100*32+1 R2 1 R3 100*32+1 ); printf "G is %d\n", eval "$g_tun{R1}";