use Win32;

my $path =  Win32::ExpandEnvironmentStrings("%Path%");
printf "Path: $path\n";

my(@path) = split(/;/,$path);

foreach my $dir (@path){
	unless (-d $dir){
   print "Invalid Dir: $dir\n";
   next;
   }

   print "Dir: $dir\n";
   opendir(DIR, $dir) or die $!;

    my @dots 
        = grep { 
            /perl/             # Begins with a period
	} readdir(DIR);

    # Loop through the array printing out the filenames
    foreach my $file (@dots) {
        print "\t$file\n";
    }

    closedir(DIR);

	
	
}
