I'm trying to concatenate 2 arrays. The catch is that I'm trying to concatenate the elements. like the following
my @array = qw/one two three four/;
my @array2 = qw/a b c d/;
I want the result to be stored in a new array.
the result should be like:
one:a, two:b, three:c, four:d
Original Code:
my $ref_svc = $dbh->selectcol_arrayref("
my $ref_id = $dbh->selectcol_arrayref("
my %hash = ();
@hash{@{$ref_svc}} = @{$ref_id};
I realized i need to append a port on the end of the service name as i mentioned before so I tried this but it doesn't work and I'm stumped.
my $ref_svc = $dbh->selectcol_arrayref("
my $ref_id = $dbh->selectcol_arrayref("
my $ref_port = $dbh->selectcol_arrayref("
my %hash = ();
my @tmp = ();
@tmp = map{"@{$ref_svc}[$_]:@{$re
@hash{@tmp} = @{$ref_id};