You could do this by creating a routine that is used with File::Find.
Untested:
use File::Find;
my @files;
sub find_process {
push @files, $File::Find::name if /\.xml$/;
}
find(\&find_process, 'C:/test'); ### Note: I'm not familiar with Windo
+ws pathing.