use File::Glob qw(:globally :nocase); chdir 'd:\log\exported'; my @files = <*.elog>;