Monks,
When reading a a directory, I would like to differentiate between a file and directory. Read Comment below....
@return_files = readDirectory($directory);
foreach(@return_files)
{
next if ($_ eq "." || $_ eq "..");
#######################
#How can a tell between files and directories?
########################
print OUT "<ul>
<li id=\"foldheader\">$_</li>";
print OUT "</ul>";
}
sub readDirectory
{
opendir DIR, $directory;
@files = readdir(DIR);
return @files;
closedir(DIR);
}
Any suggestions