in reply to list two paths files into one array

Hi, please take a look at the documentation for Path::Iterator::Rule, which can be used simply to "store up" the file names as shown below, or can filter for various different criteria first (not_empty, min size, etc).

use strict; use warnings; use Path::Iterator::Rule; my @dirs = ( '/somepath/to/dir1', '/other/path/to/dir2', ); my $rule = Path::Iterator::Rule->new->file; for my $file ( $rule->all( @dirs ) ) { say $file; # etc. } __END__

Hope this helps!


The way forward always starts with a minimal test.