my $somearray = qw ( servername );
$server_list_hash{$server} = @somearray;
Which hasn't done what you thought, because it's done an assignment in a scalar context, which means it's assigned the number of elements in @somearray.
What you would actually need to do would be:
$server_list_hash{$server} = [@somearray];
Be careful with something like:
$server_list_hash{$server} = \@somearray;
Because this will break if you reuse @somearray (e.g. it's not lexically scoped) because you'll be using the same reference each time |