my %config= ( A => \%config_A, B => \%config_B, ); my $config= $config{ $test } or die "Unknown test '$test'";