Message-ID: <4RAa9h$Nrr@newsmth.net>
Subject: ��谈�perl�莨���梅�
Date: Fri, 17 Nov 2006 03:00:43 +0000
From: lshj98115@newsmth.net-SPAM.no (pipi)
Path: news.cnusenet.org!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-cn.bbs.comp.lang.perl.mbox.zip!g2news2.google.com!news4.google.com!news2.volia.net!newsfeed.gamma.ru!Gamma.RU!newsfeed.simtel.ru!Simtel.RU!news.newsmth.net!NEWSMTH
Newsgroups: cn.bbs.comp.lang.perl
Organization: 水木����
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: Perl/H/M.1163732443.j0
Xref: news.cnusenet.org cn.bbs.comp.lang.perl:30097

写��一��perl�疟� 目���前训�前目录������目录���.v�募�删���
#!/usr/bin/perl -w

$cur = `pwd`;
chomp($cur);
delv($cur);

sub delv
{
    $dir = $_[0];
    print"current dir  is \"$dir\" \n";
    system "rm -rf  $dir/*.v" ;
    while(<$dir/*>)     
    {
        if(-d $_)
        {       
            print"$_ will be processed! \n";
            delv($_);
        }       
    }
}
思路��一直�诘�前目录������使�镁��路����删���募���
���执������ 只删���说�前�募��泻���一���募������.v�募����������虏���募���没��删��


直����find������������要������一��perl�递归,�烦��腋�指����������凇�
--

�� ��源:��水木���� http://newsmth.net��[FROM: 211.155.250.*]