>You're misusing it.  Set it within the wanted() routine when you're
 >looking at
>a directory that you don't want to descend.  It'll be cleared to 0
 >before
>calling wanted(), so setting it before calling find() is completely
 >useless.

>-- 
>Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777
 >0095
><[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
>Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.

-

Is this what you mean on line 9? I tried and it does not seem to work,
 meaning it still descending.

1         sub find_me {
2              use Data::Dumper;
3              my $fs = shift;
4              #local $File::Find::prune = shift; ##-- localize prune
 to just this block --##
5              #my @directory = ($fs) ;
6              use constant MAX_SIZE => (25*1024*1024) ;
7              use constant DIVISOR  => (1024) ;
8              my ( $wanted, $list ) = find_by_min_size ( MAX_SIZE ) ;
9              File::Find::find ( { wanted => $wanted, prune =>
 $File::Find::prune = shift}, $fs ) ;
10            @large_files = $list->() ;
11
12            @sorted_large_files =
13                 sort { -s $b <=> -s $a }
14            @large_files ;
15
16       } ##-- End sub --##






      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to