Given your loose spec, this is pretty trivial for Path::Tiny.
#!/usr/bin/env perl use strict; use warnings; use Path::Tiny; my $out = path ('output.txt'); for my $file (path ('logs')->children) { $out->append ($file->slurp); }
In reply to Re: read files one by one in directory and redirct output to a file
by hippo
in thread read files one by one in directory and redirct output to a file
by TonyNY
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |