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;
|
---|
In Section
Seekers of Perl Wisdom