Changeset 193 in lab for trunk/misc/findnonsjis.pl


Ignore:
Timestamp:
Jan 25, 2013 6:26:26 PM (11 years ago)
Author:
mitty
Message:
  • fix: previous procedure skips files such as '...'
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/misc/findnonsjis.pl

    r191 r193  
    3030    print STDERR "checking '$target'\n"; 
    3131    opendir(my $dir, $target) || return $target; 
    32     my @entries = sort readdir($dir); 
     32    my @entries = sort grep { !m/^(\.|\.\.)$/g } readdir($dir); 
    3333    closedir($dir); 
    3434     
    3535    my @dirs; 
    3636    while (my $entry = shift @entries) { 
    37         next if ($entry =~ /^\.+$/); 
    3837        if (match($entry)) { 
    3938            print "'$target/$entry' contains non Shift_JIS character\n"; 
Note: See TracChangeset for help on using the changeset viewer.