Help for this page

Select Code to Download


  1. or download this
    my $counter = 0;
    my @combined;
    push @combined, "$_:$array2[$counter++]" for @array1;
    
  2. or download this
    my $counter = 0;
    my @combined = map { "$_:$array2[$counter++]" } @array1;
    
  3. or download this
    my @combined = map { "$array1[$_]:$array2[$_]" } 0..$#array1;