perl 修改文件

just posted @ 2009年6月02日 22:52 in 脚本 , 1508 阅读

 

#perl 修改文件

use Tie::File;
my $file="E:\\work\\weblizer\\webalizer.conf";

tie @array, 'Tie::File', $file, or die ('open out file failed');
$array[0] = "sssss; #修改第一行
print $array[1]  #输出第二行
#修改完毕
untie @array;

 

详细请google Tie::File  之 

 

  • 无匹配
  • 无匹配
the impossible quiz 说:
2019年2月16日 16:19

Your article is very good, I have read a lot of articles but I am really impressed with your article. Thank you, I will review this article. To know about me, try talking to me


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter