标签:
use FileHandle;
my %fh;
my @filehandlename=("A","B","C"); ##文件句柄的名字;
for my $filehandlename (@filehandlename){
$fh{$filehandlename}=FileHandle->new("> $filename"); ##$filename 代表输出文件的名字
$fh{$filehandlename}->pritn("输入的字符串");
$fh{$filehandlename}->close();
}
标签:
原文地址:http://www.cnblogs.com/yangyongzhi/p/4714090.html