#!/usr/bin/perl use strict; use warnings; chomp (my $t = ); while (my $line = ) { chomp($line); my ($b, $s, $c) = split / /, $line; print $b + $s - $c, "\n"; }