in reply to Trouble opening and reading file within loop
You've fallen for the basic readdir trap (you didn't RTFM close enough)
one easy solution (read glob for caveats) my @files = glob "Configs/*";
Path::Tiny is very convenient
use Path::Tiny qw/ path /; for my $file ( path( "Configs/" )->children ){ my @config = $file->slurp_raw; ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Trouble opening and reading file within loop (readdir)
by Anonymous Monk on Sep 21, 2015 at 22:24 UTC | |
|
Re^2: Trouble opening and reading file within loop (readdir)
by H0tc@xe (Initiate) on Sep 22, 2015 at 00:50 UTC | |
by Anonymous Monk on Sep 22, 2015 at 00:59 UTC | |
by H0tc@xe (Initiate) on Sep 22, 2015 at 01:32 UTC | |
by Anonymous Monk on Sep 22, 2015 at 01:49 UTC |