note
zork42
BUG: folders can contain things other than files and folders.
<br>I'm pretty sure this is true even in Windows.
<br>eg when I do <c>dir C:\Users</c>, I see <c><DIR></c>s, but also <c><SYMLINKD></c>s and <c><JUNCTION></c>s (Windows Vista)
<br>See [doc://-X|file test ops]
<br><br>So you might want to change lines 16-27 in your OP, as indicated by ##### in the following:
<c>
for my $file (@files)
{
print $file;
if(-f $file)
{
print " is a file.\n";
}
#else #####
elsif (-d _) #####
{
print " is a dir.\n";
}
else #####
{ #####
print " is something else.\n"; #####
} #####
}
</c>
1050826
1050826