Perlメモ

# PhotoCorrMakePrm.pl

open(LIST, ">PhotoCorrPrm.txt");

opendir(DIR, ".");

printf(LIST "#\tC\tL\tR\tG\tB\n");

while($file = readdir(DIR)){
    if($file =~ /.jpg/ || $file =~ /.JPG/){
	  printf(LIST "%s\t1.0\t0.0\t0.0\t0.0\t0.0\n", $file);
    }
}

closedir(DIR);

close(LIST);



if (open(DIR, "__TMPDir.txt") != 1){
    print "Failed to open dir.txt\n";
    die;
}

$openDir = opendir (DIR, $dirFrom);
if ($openDir != 1) {
print "==> [Error 0] Failed to open $dirFrom\n";
print LOG "==> [Error 0] Failed to open $dirFrom\n";
die;
}
close (DIR);

while($file = readir(DIR)){
   ......
}


最終更新:2010年12月09日 11:57