in reply to Problem in IO::Socket syntax?

print "$host FAILED to repond on $service $ports{service}\n"

becomes

print "$host FAILED to respond on $service $ports{$service}\n"

Other than that, do you have a firewall on localhost that may prevent connections?

Replies are listed 'Best First'.
Re: Re: Problem in IO::Socket syntax?
by c (Hermit) on Mar 31, 2002 at 00:13 UTC
    Thanks for correcting my poor grammar ;-) To answer your question and the previous, there is no local firewall, and I intentionally included telnet in the list of services because I know that it is not enabled on this host. Really just testing to make certain I get the output I desire when a service is down.
    I just don't understand the error that was being spit out. I don't see the concantenation that its referring to.

    -c

      If i understand correctly (and I havent run your code) you should be using the variable $service in your hash, rather than the hard reference service.

      Your hash %ports has no key of service.