use File::Glob qw(bsd_glob); my @files = bsd_glob "$dir/*";