print STDERR "checking '$target'\n";
opendir(my $dir, $target) || return $target;
- my @entries = sort readdir($dir);
+ my @entries = sort grep { !m/^(\.|\.\.)$/g } readdir($dir);
closedir($dir);
my @dirs;
while (my $entry = shift @entries) {
- next if ($entry =~ /^\.+$/);
$entry = $utf8->decode($entry);
if (match($entry)) {
print "'$target/$entry' can be composed\n";
print STDERR "checking '$target'\n";
opendir(my $dir, $target) || return $target;
- my @entries = sort readdir($dir);
+ my @entries = sort grep { !m/^(\.|\.\.)$/g } readdir($dir);
closedir($dir);
my @dirs;
while (my $entry = shift @entries) {
- next if ($entry =~ /^\.+$/);
if (match($entry)) {
print "'$target/$entry' contains non Shift_JIS character\n";
next;