## Globbing opendir(DIR, $inPath) or die$!; my @xmlfiles = glob("*.xml"); foreach my $file (@files) { print "$file\n"; ## Lists all the files }