samirpatry has asked for the wisdom of the Perl Monks concerning the following question:
use warnings; use strict; my ($listitem,$dir); $dir="C:/Temp"; opendir(DIR, $dir) or die "Can't open $dir: $!"; my @contents = grep !/^\.\.?$/, readdir DIR; foreach $listitem ( @contents ) { print "$listitem\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Read entire file from given folder
by prasadbabu (Prior) on Aug 29, 2006 at 10:02 UTC | |
|
Re: Read entire file from given folder
by holli (Abbot) on Aug 29, 2006 at 10:03 UTC | |
by izut (Chaplain) on Aug 29, 2006 at 15:40 UTC | |
|
Re: Read entire file from given folder
by ambrus (Abbot) on Aug 29, 2006 at 10:37 UTC | |
|
Re: Read entire file from given folder
by planetscape (Chancellor) on Aug 30, 2006 at 14:04 UTC |