這個模組可以用來找特定目錄裡的檔案,簡單說明安裝和使用方法
下載 此模組在此下載

安裝
把此模組下載,解開之後看了一下README  裡面有安裝方法
安裝指令如下
#./Configure
#之後會進入安裝模式,有些問是要回答,我是狂按Enter就安裝好了
#make test
#make install
範例
#!/bin/perl
#This sample find the file name :abc in current directory, if find print Found info
use File::Find ;
$File::Find::name ="abc" ;
find (\&list,".") ;
sub list
{
        next if ($_ eq ".") ;
        if (-e $File::Find::name)
        {
                print "Found $File::Find::name\n";
        }
else
        {
                print "Didn't find $File::Find::name\n";
        }
}

arrow
arrow
    全站熱搜

    yuanann 發表在 痞客邦 留言(0) 人氣()