my $path = "Filer/$filename"; #### use File::Spec; my $path = File::Spec->catfile('Filer', $filename"); #### my @paths = path("Filer")->children( qr/\.txt\z/ ); # now do something with each element of @paths