while (my $line = ) { chomp $line; my @in = split / /, $line; my $val = $in[0] + $in[1]; print $val . "\n"; }