in reply to How to determine whether a dir entry is a directory?
use Fcntl ':mode'; $mode & S_IFDIR; S_ISDIR($mode); [download]