use strict; use Data::Dumper; { my( $key ) = 'Statistic::Test'; my( $val ) = [ 1, 2, 3, 4 ]; { no strict 'refs'; ${$key} = $val; } print Dumper( $Statistic::Test ); } #### Name "Statistic::Test" used only once: possible typo at ref.pl line 12. $VAR1 = [ 1, 2, 3, 4 ];