1. I've never had problems with
glob except where spaces appear in the pattern, and then I
use File::Glob 'glob';. I did not here because I thought it an unnecessary complication. KISS. If it is that easy to produce a portable version using
opendir/
readdir/
closedir then one wonders why
glob is not fixed in the base.
2. I used to use BSD style braces until I discovered
TheDamian's Perl Best Practices.
3. Whitespace? I thought everyone coded like that.
4. It is a good idea to do a
closedir (I'm sure you knew that).
Update: improved format.