Help for this page
my @fhandle_array; for $filename (@filenames) { ... #push the filehandle into your filehandle array push(@fhandle_array, *FILE); }
sub close_files() #args: none. uses global array: fhandle_array { ... close $handle; } }