Next | Program Repair Shop | 210 |
if () { while () { if () { if () { while () { if () { ... } } } } } }
opendir(DIR, "f:/list-logs" or die ...; while($dir = readdir(DIR)) { next if $dir eq "." or $dir eq ".."; next unless -d "f:/list-logs/$dir";
opendir(SUB, "$listlogs/$dir") or next;
while($file = readdir(SUB)) { next unless $file =~ /\.log.+/i; $total += -s "$listlogs/$dir/$file"; } closedir(SUB); } closedir(DIR);
Next | Copyright © 2002 M. J. Dominus |