darrengan has asked for the wisdom of the Perl Monks concerning the following question:
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);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: get directory listing
by merlyn (Sage) on Nov 08, 2005 at 11:33 UTC | |
Re: get directory listing
by pg (Canon) on Nov 08, 2005 at 07:09 UTC | |
Re: get directory listing
by blazar (Canon) on Nov 08, 2005 at 11:15 UTC | |
by bluto (Curate) on Nov 08, 2005 at 16:31 UTC | |
by blazar (Canon) on Nov 08, 2005 at 16:52 UTC | |
by bluto (Curate) on Nov 08, 2005 at 19:35 UTC | |
by blazar (Canon) on Nov 09, 2005 at 14:36 UTC | |
A reply falls below the community's threshold of quality. You may see it by logging in. |