neo_philiac
08-13-2008, 02:19 PM
Stupid question but I want to add multiple elements into a hast not just a pair:
So,
chomp($fill{1} = ("Host_1","hostname_1"));
if I do this and then try to print with
foreach $key (sort keys %fill) {
print "\n".$key."\t".$fill{$key}.$fill{$value}."\n\n";
}
I get :
1 hostname1
I am trying to associate two elements into one key. What am I doing wrong?
I want :
1 Host_1 hostname1
Thanks
So,
chomp($fill{1} = ("Host_1","hostname_1"));
if I do this and then try to print with
foreach $key (sort keys %fill) {
print "\n".$key."\t".$fill{$key}.$fill{$value}."\n\n";
}
I get :
1 hostname1
I am trying to associate two elements into one key. What am I doing wrong?
I want :
1 Host_1 hostname1
Thanks