Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
No errors, it's just not printing anything out. Any idea why?
#!/usr/bin/perl use warnings; use strict; my $dir = "."; opendir(DIR, $dir) || die "can't opendir $dir: $!"; my @dots = grep { /^\./ } readdir(DIR); closedir DIR; print join("\n", @dots);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: reading all files in a dir
by jeffa (Bishop) on Aug 25, 2006 at 18:11 UTC | |
|
Re: reading all files in a dir
by friedo (Prior) on Aug 25, 2006 at 18:19 UTC | |
|
Re: reading all files in a dir
by jwkrahn (Abbot) on Aug 25, 2006 at 18:21 UTC | |
|
Re: reading all files in a dir
by swampyankee (Parson) on Aug 25, 2006 at 18:27 UTC |