print on closed filehandle main::STDOUT at write2.pl line 7.