Hi,
I'm trying to load a hash with a array as follows:
Standard syntax would look like this
my @array = (15,89,23);
my %hash = ("Value1" => $array[0],
"Value2" => $array[1],
"Value3" => $array[2]
);
I'm trying to do the assignment in one line. The following code DOES NOT work, but gives an idea of what I want:
my @array = (15,89,23);
my %hash("Value1","Value2","Value3"
= @array;
Any suggestions?
AD AUGUSTA PER ANGUSTA
Thierry
I'm trying to load a hash with a array as follows:
Standard syntax would look like this
my @array = (15,89,23);
my %hash = ("Value1" => $array[0],
"Value2" => $array[1],
"Value3" => $array[2]
);
I'm trying to do the assignment in one line. The following code DOES NOT work, but gives an idea of what I want:
my @array = (15,89,23);
my %hash("Value1","Value2","Value3"
Any suggestions?
AD AUGUSTA PER ANGUSTA
Thierry