- 论坛徽章:
- 0
|
open COMMENT ,"< comment.txt" or die "cannot open comment.txt for comment";
@lines = <COMMENT>;
close COMMENT;
@filenames = <php/*.php>;
foreach (@filenames)
{
if( -w $_)
{
select STDOUT;
print "now processing file $_ n";
open FILE,"+>$_";
@filecontent = <FILE>;
unshift @filecontent ,@lines;
select FILE;
print "@filecontent";
close FILE;
@filecontent =undef;
}
} |
刚学perl的
上面是我想给每个php 程序头都加一段注释
但打开文件方式都不对的
哪个老大指点一下啊 谢谢了 |
|