in reply to File::Find - Traverse the first level directories from starting point - How?

You probably just want a combination of opendir, readdir, and that -d test to make sure $_ is a directory.

In your case you're just opening and reading the contents of /.

Replies are listed 'Best First'.
Re^2: File::Find - Traverse the first level directories from starting point - How?
by Anonymous Monk on May 20, 2020 at 14:09 UTC
    That would work well enough until ... inevitably ... "the requirements change." (Constants aren't, and variables don't ...) The previously mentioned packages are lightweight and much more future-proof.
A reply falls below the community's threshold of quality. You may see it by logging in.