in reply to Re^2: greater efficiency required (ls, glob, or readdir?)
in thread greater efficiency required (ls, glob, or readdir?)
You need to change: next if -d $file; to next if -d "$dir/$file";
You need to change: next if /^#/ || !length($line); to next if $line =~ /^#/ || !length($line);
In Section
Seekers of Perl Wisdom