Thank you for the response. I have not tried it out yet, but looks much tighter than what I wrote. I was able to get the timestamp of the files, the problem I am experiencing is how to copy a set of files to another directory, say every 300 seconds. So, for example, if you take the current time and read in the files in a particular directory, whatever files are in that 5 minute range should be copied over. The script needs to run for 24 hours straight until all files are copied or moved over.
The next part is even more difficult. I need to make it modular enough to consider multiple directories. So for example, one directory might copy files over every 300 seconds while another directory might copy files over every 1800 seconds.
Hope that makes sense? I do not know if I should make 1 perl script for each directory or make like 25 different perl scripts running at different intervals per directory. I'm having difficulty writing one script to do all.