sub addHost { my $host = shift; print "$host\n"; $getSSO{$host} = [ @_ ]; } # now this will work as is addHost('aklia700', qw(carrot lunch)); # and it's also slightly simpler when you have a named array my @a = qw(carrot lunch); addHost('aklia700', @a);