Hello rahu_6697,
Welcome to the Monastery. From my point of view I would approach the problem a bit differently. I would use stat to get each file latest updated date, sample:
my $modtime = (stat($fh))[9]
As a second step I would create a hash of hashes. The name of the file I would use it as key then the secondary keys would be keywords like stat and path or location. Sample of hash of hashes (not tested):
my %HoH = ( file_name => { stat => 'date here', location => 'path to file' );
By iterating through the directories with your files you can check one by one the file and in case of common name you can compare the latest date and either update the hash or move ot the next one.
There are many modules that can help you find the file by searching the directories recursively for example File::Find
I would approach the problem like this.
Hope this helps. In case that something is not clear let me know and I will try to analyse my answer further.
BR, Thanos
In reply to Re: GLOB function
by thanos1983
in thread GLOB function
by rahu_6697
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |