基本文件操作和替换
来源:互联网 发布:电脑dll文件修复软件 编辑:程序博客网 时间:2024/06/18 00:47
$inputFile = "1.log";
$inTestPath = "testlist";
$outTestPath = "newTestList";
open(INF, "$inputFile") or die("cannot open $inputFile/n");
while(<INF>)
{
if(//.grxml$/)
{
chomp();
s////_/g;
s/grxml$/txt/;
$listFile = $inTestPath."//Grammar_".$_;
open(LSF, "$listFile") or print "cannot open $listFile/n";
$outFile = $outTestPath."//Grammar_".$_;
open(OUTF, ">$outFile") or print "cannot open $outFile/n";
}
elsif(/^/--------/)
{
close(LSF);
close(OUTF);
}
else
{
chomp();
s//(//|/;
s//s//|/;
s//)//;
$line = <LSF>;
@items = split(//s/[/, $line);
print OUTF $items[0]." [".$_."]/n";
print $items[0]." [".$_."]/n";
}
}
close(INF);
system("pause");
- 基本文件操作和替换
- vi基本操作(2) -- 查找和替换
- File文件基本操作之二:java 替换指定文件中的指定内容
- Linux(3)文件和目录基本操作
- linux 基本文件操作和下载命令
- Linux文件基本属性和操作
- 文件和目录的基本操作
- 文件的属性和基本操作
- 多文件字符串替换操作
- scrip基本操作 拼接 替换 分割.....
- 数据库访问及其基本操作(sql server和添加删除查找替换)
- 文件基本操作之创建和删除文件
- git基本操作--删除文件和移动文件
- WinCE文件基本操作
- C# 基本文件操作
- C++基本文件操作
- 文件的基本操作
- WinCE文件基本操作
- 检查工具
- struts2笔记:
- with(nolock)详解【转】
- 项目
- poj2262
- 基本文件操作和替换
- 关于Linux下.so的介绍和编写过程
- having的用法
- 题目:一个注释很详细的applicationContext.xml
- [HOW TO]如何在iPhone应用程序中发送邮件
- tcp/ip 学习笔记
- 物化视图,索引,数据仓库
- 看电影
- asus_华硕P535专用UCWEB 7.0版 CAB安装包下载