in reply to Opendir and regex
You could instead call glob, which combines directory search and pattern matching on file names. With that you can write,
Yet another way is with File::Find. That would be the choice if you wanted to process subdirectories, too.for (glob '*.{log,txt}') { -M > $expiration and system '/usr/bin/gzip', $_; }
After Compline,
Zaxo
|
|---|