use File::Path qw/make_path/; # ... make_path map { "$dir/$_" } @files;