gnu@perl has asked for the wisdom of the Perl Monks concerning the following question:
Anyway, I have a config file like the following:
/opt/gvc/gvc_dtfr/port*/done/*gz 20 /opt/gvc/gvc_dtfr/log 30
The first part is the path glob and the second is the maximum mtime to keep. As you can see, the first line of the config file would not parse correctly in an opendir/readdir combination.
I would like to be able to retain this globbing ability in the config file, otherwise the top line would turn into over 100 lines if I had to enter each one seperatly.
Any Ideas on how I can use this glob quickly and efficiently in a perl program (*nix environment).
TIA,
Chad
| Replies are listed 'Best First'. | |
|---|---|
|
Re: parsing directory glob in config file
by fglock (Vicar) on Sep 13, 2002 at 19:08 UTC | |
by gnu@perl (Pilgrim) on Sep 13, 2002 at 19:36 UTC | |
by chromatic (Archbishop) on Sep 13, 2002 at 20:13 UTC | |
by gnu@perl (Pilgrim) on Sep 13, 2002 at 20:22 UTC | |
by gnu@perl (Pilgrim) on Sep 13, 2002 at 19:59 UTC | |
|
Re: parsing directory glob in config file
by mothra (Hermit) on Sep 13, 2002 at 21:17 UTC | |
|
Re: Parsing directory glob in config file.
by Zaxo (Archbishop) on Sep 13, 2002 at 20:44 UTC |