C:\test>start /b lsn.pl 25000 C:\test>Running with pid:12100 C:\test>lsn.pl 25000 Running with pid:11664 Only one usage of each socket address (protocol/network address/port) is normally permitted at C:\test\lsn.pl line 7. C:\test>taskkill /f /pid 12100 SUCCESS: The process with PID 12100 has been terminated. #### #! perl -slw use strict; use IO::Socket; print "Running with pid:$$"; my $lsn = IO::Socket::INET->new( Listen => 1, LocalPort => $ARGV[0] ) or die $^E; while( my $client = $lsn->accept ) { close $client; }