File input/output

Closing a filehandle

When you are finished with a filehandle, you may close it with the close function.

The close function closes the file or device associated with the filehandle.

Example:

close (IN_FILE);
Filehandles are automatically closed when the program exits, or when the filehandle is reopened.
Table of Contents.
Previous | Next.