my $path = "C:\\\\Ba\\Log\\"; # or whatever this win32 stuff will take my @goodnames = grep {$_ !~ m/Incorrect/} glob($path*ULOG*);