use File::Find::Rule qw/ find rule /; my @files = find( file => name => 'OT', maxdepth => 1, in => $trans_dir, );