... if (m/(.+?)\+(.+)) my $firstTerm = $1; my $secondTerm = $2; return diff($firstTerm)."+".diff($secondTerm);