http://www.perlmonks.org?node_id=467099


in reply to I don't want to search subfolders

File::Find::Rule has a maxdepth method to limit how far down the tree to look.

YuckFind

#!/usr/bin/perl use strict; use File::Find::Rule; use Data::Dumper; my @dirs = ( 'L:\\renws\\billing\\uploadh', ); my @files = File::Find::Rule ->file() ->maxdepth(1) ->name(qr/.RP1/) ->in(@dirs); print Dumper \@files;