Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    my @result= map {$_ += $array2[$i++];int($_/2 +.6)} @array1;
    
    print "@result\n";
    
  2. or download this
    # Here is a version that will not break array 1
    use strict;
    ...
    my @result= map {int( ($_+$array2[$i++])/2 +.6)} @array1;
    
    print "@result\n";