作成しているファイルを、perlスクリプトで作成したディレクトリに出力したいと思います。
ディレクトリを作成できます
use File::Path;
$dir = "foo/";
mkpath($dir);
と私のファイル
$FILE = "output.txt";
unless(open $filehandle, ">", $FILE){
die "\nUnable to create $FILE:\n$!";
}
printf $filehandle "writing stuff to my file\n";
printf $filehandle "and some more stuff\n";
close($filehandle);
スクリプトの前半で作成したディレクトリに出力されるファイルを除いて、すべて正常に動作します。
どんな助けでもいただければ幸いです。