use strict; use warnings; { no strict "refs"; my $site = "foo"; my @{"platforms_$site"} = qw( foo bar ); my %{"platforms_$site"} = map { $_ => 1 } @{"platforms_$site"}; } => Can't declare array dereference in "my" at xx.pl line 8, near "} =" Execution of xx.pl aborted due to compilation errors. #### use strict; use warnings; { no strict "refs"; my $site = "foo"; @{"platforms_$site"} = qw( foo bar ); %{"platforms_$site"} = map { $_ => 1 } @{"platforms_$site"}; }