#!/usr/bin/perl use strict; use warnings; use threads; use threads::shared; use FCGI qw[]; use IO::Handle qw[]; use constant THREAD_COUNT => 5; my @count : shared = (0, (0) x THREAD_COUNT); sub worker { my $k = shift; my %env; my $in = IO::Handle->new; my $out = IO::Handle->new; my $err = IO::Handle->new; my $request = FCGI::Request($in, $out, $err, \%env); while ($request->Accept >= 0) { print $out "Content-type: text/html\r\n", "\r\n", "