sub buildSubTree { ... #printf qq[Fetching data for %s ...\n], $path; foreach my $dir ( sort readdir $DH ) { ... my $annotation = annotate( $path , $size , $dirs , $files ); warn qq[$annotation], "\n"; $tree->entryconfigure( $node , '-text' => $annotation ); ++$stack->[-1]; } closedir $DH or die qq[Cannot close "$path": $!\n]; pop @$stack; printf( "=== %s\n", annotate( $path, $sizeTotal, $fileCount, $dirCount ) ); return ( $dirCount , $fileCount , $sizeTotal ); }