]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-send-email.perl
send-email: use Perl idioms in while loop
[thirdparty/git.git] / git-send-email.perl
index bfc6d4b45b1c7e2b9741eba5cfe323979751e7d2..036e4b4259babdda1e76a5aa558c3600b43a89c0 100755 (executable)
@@ -1252,10 +1252,9 @@ foreach my $t (@files) {
        if (defined $cc_cmd && !$suppress_cc{'cccmd'}) {
                open my $fh, "$cc_cmd \Q$t\E |"
                        or die "(cc-cmd) Could not execute '$cc_cmd'";
-               while(<$fh>) {
-                       my $c = $_;
+               while(my $c = <$fh>) {
+                       chomp $c;
                        $c =~ s/^\s*//g;
-                       $c =~ s/\n$//g;
                        next if ($c eq $sender and $suppress_from);
                        push @cc, $c;
                        printf("(cc-cmd) Adding cc: %s from: '%s'\n",