#!/usr/bin/perl use strict; use warnings; use Parallel::ForkManager; use PerlIO::gzip; my $pm = Parallel::ForkManager->new(12); open(IN, '<:gzip', 'wat.paths.gz') or die "can't open index"; while (my $file = ) { print length($file) . ":$file\n" if length($file) > 142; #next; next if $pm->start; $pm->finish; } close IN; $pm->wait_all_children;