Your hash %ports has no key of service.
In reply to Re: Re: Re: Problem in IO::Socket syntax? by Ryszard in thread Problem in IO::Socket syntax? by c