Note that if all you want to do is collect up the service name related to a port, Perl's got getservbyport:
use warnings; use strict; my @ports = qw(21 22 23); my $protocol = 'tcp'; for (@ports){ my ($name, $alias, $num, $proto) = getservbyport($_, $protocol); print "$num: $name\n"; }
In reply to Re: Port check - Services File
by stevieb
in thread Port check - Services File
by deelinux
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |