my $verify_port = sub { my $port = shift; if ($port) { if ($port > MAX_PORT or $port < MIN_PORT){ return TRUE; } } else { $moduleInput{-port} = 123; return FALSE; } };