#decide whether or not this is a file the user wants ... #### foreach file in the directory { get the date from the filename check if it is in the $get_file_from to $get_file_to range if so, add it to @files } later foreach @files { open and process }