in reply to print() on closed filehandle STDOUT after printing to socket

Perhaps you should pay attention to the earlier Useless use of concatenation (.) or string in void context error...