Stamp_Guy has asked for the wisdom of the Perl Monks concerning the following question:
use Cwd; print "Current dir is: ", cwd, "\n"; local $_; opendir(TEXTFILES, "desktop") || die "Couldn't open the text file dire +ctory: $!"; @data=readdir(TEXTFILES); foreach (@data) { print if(-d "./$_"); } closedir(TEXTFILES);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Getting a simple directory listing
by ZZamboni (Curate) on May 01, 2001 at 04:09 UTC | |
by Stamp_Guy (Monk) on May 01, 2001 at 04:41 UTC | |
Re: Getting a simple directory listing
by tinman (Curate) on May 01, 2001 at 04:12 UTC | |
by Stamp_Guy (Monk) on May 01, 2001 at 04:16 UTC | |
by ZZamboni (Curate) on May 01, 2001 at 04:24 UTC | |
by Stamp_Guy (Monk) on May 01, 2001 at 04:27 UTC | |
by ZZamboni (Curate) on May 01, 2001 at 04:35 UTC | |
Re: Getting a simple directory listing
by eejack (Hermit) on May 01, 2001 at 04:14 UTC |