sub listfiles { $path = shift; $path = "." unless $path; opendir( DIR, $path ) || die "Can't open $path: $!"; !/^\./ and push @entry, "$_\n" while ($_ = readdir(DIR)); #removes + the . and .. entries from readdir closedir( DIR ); return @entry; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Directory Listing to an Array
by japhy (Canon) on Apr 10, 2002 at 23:12 UTC | |
by cybear (Monk) on Apr 17, 2002 at 14:56 UTC | |
by japhy (Canon) on Apr 17, 2002 at 15:13 UTC | |
|
Re: Directory Listing to an Array
by emilford (Friar) on Apr 11, 2002 at 04:18 UTC | |
|
Re: Directory Listing to an Array
by ehdonhon (Curate) on Apr 10, 2002 at 23:28 UTC | |
by particle (Vicar) on Apr 11, 2002 at 01:26 UTC | |
by ehdonhon (Curate) on Apr 11, 2002 at 11:41 UTC | |
|
Re: Directory Listing to an Array
by vkonovalov (Monk) on Apr 29, 2002 at 06:12 UTC | |
by Anonymous Monk on Feb 28, 2003 at 02:37 UTC |