1. 创建目录
创建目录和python有所不同
python:
#!/usr/bin/python
import os
# creat a new dictionary
os.makedirs(path)
#!/usr/bin/perl
use File::Path;
# create a new dictionary
mkpath(path);
2. 创建文件夹
创建文件夹和打开文件夹差不多
创建可写入文件
open(DATA,">**.txt") or die “can not open this file”;
#!/usr/bin/perl
use File::Path;
# creat a new dictionary
mkpath("little/parrot/");
open(DATA,">little/parrot/cute.txt"