jgordin has asked for the wisdom of the Perl Monks concerning the following question:
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Expanding dates
by Corion (Patriarch) on Feb 13, 2001 at 00:22 UTC | |
Update:Test your code before you press that pesky Submit button ... You want to do some globbing on the filenames. This could be done with the perlfunc:glob() builtin, but you also want some ordering. Here is one approach : | [reply] [d/l] [select] |
Re: Expanding dates
by Masem (Monsignor) on Feb 13, 2001 at 00:27 UTC | |
Edit: 2001-03-03 by neshura | [reply] [d/l] |
by lemming (Priest) on Feb 13, 2001 at 01:00 UTC | |
It would be faster to do a readdir and weed out the files outside the range. Doing a file test for every possibilty can be a bit disk intensive. Crossing the century boundry isn't much of a problem since the file range format is done so that the file for Dec 20, 1999 is less than Jan 4, 2001. You method does make sure that non-dates are not listed. I was wondering if this question could be a homework question, which stops me from doing a full solution. (well, that and I should be working...) | [reply] |
Re: Expanding dates
by seeker (Curate) on Feb 13, 2001 at 01:39 UTC | |
Good luck
| [reply] |
Re: Expanding dates
by Anonymous Monk on Feb 13, 2001 at 05:18 UTC | |
| [reply] [d/l] |