in reply to Using hashref values in constant declarations.

I assume the @test array is allocated at compile time, and it's reference is set to GOODCONSTANT also at compile time. Then it's populated at runtime, but the constant is still pointing to the same memory. If this is the case, then it makes sense that my first method won't ever work. Is there a workaround to get the first method to work?

Yes, and yes:

my $hashref; BEGIN { $hashref = { 'ONE' => 1, 'TWO' => 2, 'THREE' => 3, 'FOUR' => 4, }; } use constant HASHREFCONST => [$hashref->{ONE} .. $hashref->{FOUR}];

Altho that is one heck of a strange way to use hashref to set up a constant... what's wrong with use constant FOO => [1 .. 4];?