On Tue Mar 03 2009 @  4:03, Telemachus wrote:
> > > > find( sub { -f and ( $size += -s _ ) }, $dir );
> 
> That line tests if each item in $dir is a *file* (-f). 

Sorry: hit send too quickly. What I meant to say there is that the
subroutine tests for files - starting from whatever directory you specify in
$dir and drilling recursively down and down. Anything it finds that is a
file, it gets the size of and adds that number to $size.

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to