And also Ævar is right. The original just has a format-patch output
in $_ and prints it to the output stream in one go.
Sorry but I misread the patch. By dropping the $/ = undef, it wants
to read from $fd (which is "format-patch --stdout" output) one line
at a time. So unless a line has two addresses, this would "work" as
intended.
Again, as I said, I do not agree with the definition of "work" here,
though ;-).