8 lines
156 B
Perl
8 lines
156 B
Perl
|
#!/usr/bin/perl -w
|
||
|
|
||
|
# Finds an open port.
|
||
|
$port = 2345;
|
||
|
while (getservbyport($port, "tcp") ) {
|
||
|
$port++;
|
||
|
}
|
||
|
print "An open port number is $port\n";
|