my $verify_port = sub { my $port = shift; if ( defined $port && $port =~ /^[0-9]+$/ ) { if ( $port >= MIN_UDP_PORT || $port <= MAX_UDP_PORT ) { return FALSE; } } return TRUE; };