use File::Glob qw(glob); my @files = glob('C:/Program Files/*'); print "@files\n";