rahu_6697 has asked for the wisdom of the Perl Monks concerning the following question:
I am working on a database and i have to work on all .txt files present in different directories. Some file with same name are also present in different directories but i have to work on only those which are latest updated/created. I am using glob command but it is passing all files with .txt format into the array assigned to it. I just want to remove duplicate entries on basis of date of formation of file. Only latest file should present rest all files with same name should get eliminate.Only files with unique names should get stored in @filelist. Please help me out...
my @filelist = glob"/user/*/ws/*/BLK_*/*.txt for my $file (@filelist) { . . . . . }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: GLOB function
by thanos1983 (Parson) on Jun 18, 2018 at 13:44 UTC | |
|
Re: GLOB function
by haukex (Archbishop) on Jun 18, 2018 at 18:23 UTC | |
by rahu_6697 (Novice) on Jun 19, 2018 at 05:16 UTC | |
by thanos1983 (Parson) on Jun 19, 2018 at 09:13 UTC | |
| |
by haukex (Archbishop) on Jun 19, 2018 at 08:07 UTC | |
by choroba (Cardinal) on Jun 19, 2018 at 15:17 UTC | |
by haukex (Archbishop) on Jun 19, 2018 at 18:02 UTC | |
by rahu_6697 (Novice) on Jun 19, 2018 at 09:09 UTC | |
by haukex (Archbishop) on Jun 19, 2018 at 18:16 UTC | |
|
Re: GLOB function
by taint (Chaplain) on Jun 19, 2018 at 16:28 UTC |