in reply to Re: File::Glob Ignores Dot Files in thread File::Glob Ignores Dot Files
The correct form of this glob pattern is really {.[!.],.??*,*}. Unfortunately, that has bugs in perl 5.8.8, although it works on 5.14 and 5.16. So, the actual best practice may be to avoid glob altogether and open a dirhandle yourself and read/filter the file names you get back.
Re^3: File::Glob Ignores Dot Files
by Aristotle (Chancellor) on Dec 30, 2013 at 20:22 UTC
|
Nowadays I’d just use Path::Tiny and do path($to_dir)->children. It excludes . and .. automatically, which is a great default. It also spits out Path::Tiny objects full of useful convenience methods, rather than just strings, which help make code much less grubby.
Makeshifts last the longest.
| [reply] [d/l] |
|