[ create a new paste ] login | about

Link: http://codepad.org/X2v4T9N3    [ raw code | output | fork ]

Perl, pasted on Aug 16:
1
2
3
4
5
my @array1=qw(4.3 0.2 7 2.2 0.2 2.4);
my @array2=qw(2.2 0.6 5 2.1 1.3 3.2);

my @diff = map {$array1[$_] - $array2[$_]} (0..$#array1);          
print  join(' ', @diff), "\n";


Output:
1
2.1 -0.4 2 0.1 -1.1 -0.8


Create a new paste based on this one


Comments: