in reply to upload filehandle expiration
If your code snippet above is not in a subroutine or otherwise nested in a block, the array of filehandles will not become available for garbage collection until the end of the script.
If you want to close them earlier, you could either wrap a bare block around the snippet and let the GC take care of them or you could just loop of the array nad close them yourself.
close $_ for @filehandles;
|
|---|