File::Find, find()

来源:互联网 发布:js中空格怎么表示 编辑:程序博客网 时间:2024/06/08 07:08

用于在unix文件树结构中查找对象:

#!/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;



0 0