#!/usr/bin/perl
use 5.026;
use warnings qw(all);
use IPC::Run3;
use Heap::Fibonacci;
use File::Find;
my $heap = Heap::Fibonacci->new;
my $processed = 0;
eval {
local $SIG{INT} = sub { die "SIGINT received" };
find(
sub {
-f or return;
my ($text, $err);
run3 [qw(man -Tutf8), $File::Find::name], \undef, \$text, \$err;
warn "man failed on $_: $?, stderr: $err" if $?;
my $count = ($text =~ tr/\n//);
$heap->add(MPLen->new($File::Find::name, $count));
my $top = $heap->top->val;