ディレクトリ内のファイル(ディレクトリ)を全削除

Path::Classを使う。

 my $dir = dir('tmp');
 foreach my $ent ($dir->children) {
    $ent->remove();
 }

参考

http://search.cpan.org/perldoc?Path::Class


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS

Last-modified: 2011-06-11 (土) 14:22:01