Help for this page

Select Code to Download


  1. or download this
    use File::Find;
    
    my $total_size = 0;
    find(sub {$total_size += -s if -f}, '.');
    print $total_size, "\n";
    
  2. or download this
    use File::Find;
    my $callback;
    {
    ...
      $callback = sub { print ++$count, ":$File::Find::name\n" };
    }
    find($callback, '.');