in reply to Re^4: listing all files of a dir
in thread listing all files of a dir

use strict; use warnings; use Cwd; my $dir=getcwd; say $dir;

...works as documented under 5.16 and W7. It's likely you erred somewhere in your code. Note the first two lines of the snippet above.

If I've misconstrued your question or the logic needed to answer it, I offer my apologies to all those electrons which were inconvenienced by the creation of this post.