use strict; use warnings; use Path::Iterator::Rule; my $destination = 'C:/Users/Documents'; my $rule = Path::Iterator::Rule->new->file->name('*.txt'); print "$_\n" for $rule->all( $destination ); __END__