Welcome to the Monastery | |
PerlMonks |
-d misses some directories ?by ady (Deacon) |
on Aug 27, 2006 at 18:28 UTC ( [id://569889]=perlquestion: print w/replies, xml ) | Need Help?? |
ady has asked for the wisdom of the Perl Monks concerning the following question:
Reverend guys; -- The following code :
Will print (for instance) : in a directory containing two subdirectories (besides the current & parent dirs; -- this is as expected). But when i change line 7 to my @dirs = sort grep { -d } readdir(DIR); i get : which is NOT what i expect, as all four entries in the above listing are indeed directories... Any explanation of this behaviour ? Best regards/ Allan
Back to
Seekers of Perl Wisdom
|
|