in reply to Directory Listing
I'm especially uncertain of what you're trying to accomplish with all your regexps. Could you be more specific about your intent?#!/usr/bin/perl -w use strict; my $dirname = "."; opendir DIR, "$dirname" or die "couldn't open '$dirname': $!"; my @files = grep { -d $_ } readdir DIR; close DIR; print join "\n", @files;
Update:
Cleaned up a bit for the strict -w police.
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: Re: Directory Listing
by elusion (Curate) on Jul 30, 2000 at 00:02 UTC |