I have a folder called "Lib" in my drive it contains many files inside and I have a problem that this "Lib" folder is there in many other places in the drive. My Perl script has to copy the contents from folder "Lib" which are latest updated and paste it in the folder "d:\perl\Latest_copy_of_Lib"
For example, I have a Lib folders in d:\functions
, d:\abc
, and many other places. I want to find the latest copy of each file in those directories. So, if the file d:\functions\foo.txt
was last modified on 2009-10-12 and d:\abc\foo.txt
was last modified on 2009-10-13, then I want the version in d:\abc
to by copied to the target directory.
I have used file::find but it searches in whole dir and copies the contents that are not latest copy.