Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Problem in IO::Socket syntax?

by Ryszard (Priest)
on Mar 30, 2002 at 23:03 UTC ( [id://155520]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://155520]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-24 01:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found