Use File::Find and filter directories and files with a regular expression and/or the various operators defined in -X. This approach will give you much more control over which files are returned. In addition to giving you access to hidden files, you can control how symbolic links and other special files are treated. This is not possible if you use a glob.
For even more low-level control, you can use opendir, readdir and closedir.
If you are trying to write portable code, you should try to avoid using globs. Globs aren't portable - their interpretation depends on the underlying operating system and shell - see glob and perlport for more information. Shell globs don't usually include hidden files, hence your inability to list hidden files in Perl.
Best, beth
In reply to Re: perl globbing cannot find all files / folder
by ELISHEVA
in thread perl globbing cannot find all files / folder
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |