use Readonly; Readonly my $FOO => 1; Readonly my $BAR => 1; my $thing = $FOO; $Things[$thing] = 'whatever'; print $Things[$thing];