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/?opendir(DIRHANDLE,"/usr/darren") || die "file to open"; @FILES = grep !/^\.\.?$/, readdir DIRHANDLE; while (<@FILES>) { chop(); $REC = $_; @LINEREC = split(/\./,$REC); print "$REC\n"; } closedir(DIRHANDLE);
In reply to get directory listing by darrengan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |