in reply to sorting files by date

Look at the three file test operators -M, -A and -C and decide which of them best mirrors your "time created". Let's assume it's -M.

The naive way to sort a list of files then becomes:

my @sorted_files = sort { -M $a <=> -M $b } @files;

But you specifically asked for an efficient method, so you'll probably want to replace that with an Orcish Maneuver or a Schwartzian Transform. See Uri Guttman and Larry Rosler's excellent paper for discussion of these methods and other Perl sorting mechanisms.

Also, you have this code:

opendir (LOWEST, "<$input_directory_lowest")

I think you're confusing open and opendir. for opendir you don't need the '<' on the directory name. In fact, I'm surprised to see that it works.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.
A reply falls below the community's threshold of quality. You may see it by logging in.