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 reply to Re^3: greater efficiency required (ls, glob, or readdir?)
by jwkrahn
in thread greater efficiency required (ls, glob, or readdir?)
by jperlq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |