As Ivan pointed out, your return value does not match what you're assigning it to:
my %names = getNames(\@info);
sub getNames {
...
return \%names;
}
%names excepts an even number of elements because it's a hash, but you're assigning it a reference to a hash, which is a single element. Hence the error.
This line of your subroutine is also a little suspect: $names{@$item[0]}=@$item[1];. Perhaps you meant to use $names{$item->[0]}=$item->[1];?
If you're trying to translate the array of arrays into a hash with keys pointing at the remaining values, you can use the following:
my @info=(
['k1','v1',1,2],
['k2','v2',2,3],
);
my %names = map {$_->[0] => [@{$_}[1..$#$_]]} @info;
use Data::Dump;
dd \%names;
Outputs:
{ k1 => ["v1", 1, 2], k2 => ["v2", 2, 3] }
If however, you're just wanting the first "value", then the following would be sufficient:
my %names = map {$_->[0] => $_->[1]} @info;