readline() on closed filehandle $fh at test.pl line 4. readline() on closed filehandle $fh at test.pl line 9.