mawemy @file = @ARGV; my @coords; foreach $f (@file) { open (FILE, "<$f"); while (<FILE>) { my @line = split(/\s+/,$_); for my $i (0..$#line) { $coords[$i] += $line[$i]; } } close FILE; } print "@coords\n";
In reply to Re^3: Bit of maths between two files
by mawe
in thread Bit of maths between two files
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |