All pastes #186355 Raw Edit

Mine

public text v1 · immutable
#186355 ·published 2006-09-29 20:44 UTC
rendered paste body
#!/usr/bin/perl

use strict;
use IO::Socket;

my $start = 8801;
my $max   = 9000;
my @_fh   = ();

for($start..$max) {
    $_fh[$_] = IO::Socket::INET->new(   LocalPort   =>  $_,
                                            LocalAddr   =>  'localhost',
                                            Proto       =>  'tcp',
                                            Reuse       =>  1,
                                            Listen      =>  SOMAXCONN)
                   or die "Couldn't open port $start : $!\n";

}


sleep 60;

foreach (@_fh) {
    close($_);
}