in reply to Re^2: quickest way to find number of files in a directory?
in thread quickest way to find number of files in a directory?

That depends on your shells. At least under bash, you can use glob() to grab dot files, for example:
  print "$_\n" for grep{ -f } glob(".*");
Or probably if you want to grab both dot and non-dot files:
  print "$_\n" for grep{ -f } glob("{*,}.*");
Regards,
Xicheng
  • Comment on Re^3: quickest way to find number of files in a directory?

Replies are listed 'Best First'.
Re^4: quickest way to find number of files in a directory?
by ferreira (Chaplain) on Mar 27, 2007 at 20:30 UTC

    Nope. It does not depend on your shell. At least not if you're using Perl 5.6 or later, because glob is implemented via the standard File::Glob extension and does not rely on shell anymore.

    The standard behavior of <*> or glob('*') is to not consider the dot files.

      In the example given, glob is not used with '*'.