in reply to read an array of file
Or do the same thing if all the files begin with 'loy':my $path = "/path-to/some-dir"; opendir(DIR, $path) || die "Could not read $path - $!\n"; for my $fileFound (grep /\.sss$/, readdir(DIR)) { # do stuff here... }
-- vek --my $path = "/path-to/some-dir"; opendir(DIR, $path) || die "Could not read $path - $!\n"; for my $fileFound (grep /^loy/, readdir(DIR)) { # do stuff here... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: read an array of file
by Jenda (Abbot) on Dec 30, 2002 at 14:08 UTC |