i am trying to get the folder name from a directory. I am currently using the script below to get the content of the directory:
opendir(DIRHANDLE,"/usr/darren") || die "file to open";
@FILES = grep !/^\.\.?$/, readdir DIRHANDLE;
$REC = $_;
@LINEREC = split(/\./,$REC);
By using the above method, will will get all the listing including the directory and files. how can i only show the directory in /usr/darren/?