Chinaunix首页 | 论坛 | 博客
  • 博客访问: 466707
  • 博文数量: 279
  • 博客积分: 4467
  • 博客等级: 上校
  • 技术积分: 2830
  • 用 户 组: 普通用户
  • 注册时间: 2007-04-03 14:43
文章分类

全部博文(279)

文章存档

2013年(1)

2012年(39)

2011年(35)

2009年(29)

2008年(131)

2007年(44)

分类:

2008-01-22 17:24:07

File::Find, find()

#!/usr/bin/perl -w

use strict;

use File::Find;



my $file = "access.log";

my $path = "/";



find(\&process, $path);



sub process{ print $File::Find::dir, "$_\n" if(/$file/); }



exit 0;

     

#用于在unix文件树结构中查找对象。
阅读(324) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~