When a process exits, the kernel recovers all used resources. This includes all the file descriptors, which are simply closed. If there is an application-level buffer, data in that buffer may not have been written to the kernel, but otherwise there is no risk in keeping file descriptors open before exiting.
If your Perl script ends by using exec
to launch another process, that process will inherit all the file descriptors (except those marked as close on exec).