opendir(dir, new_dir) or die "Cannot open dir : $!"; @files = grep {"*.xml"} readdir DIR;