Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Re: Problem in IO::Socket syntax?

by c (Hermit)
on Mar 31, 2002 at 00:16 UTC ( #155529=note: print w/replies, xml ) Need Help??

in reply to Re: Problem in IO::Socket syntax?
in thread Problem in IO::Socket syntax?

telnet is not enabled on the host i am testing on, so the output of telnet failing isnt what throws me. i dont see where the error complaining about the concatenation is coming from however.

thanks -c

Replies are listed 'Best First'.
Re: Re: Re: Problem in IO::Socket syntax?
by lestrrat (Deacon) on Mar 31, 2002 at 01:22 UTC


    I understand that you were probably frustrated not know where on earth the word "concatnation" would come out of your code, but you didn't say that that was your problem. Wouldn't you agree it's really hard to tell what you were asking? ;)

    Anyway, I think Ryszard got the answer correctly... basically, embedding variables in string implicitly invokes the concat op, so your line 40 is equivalent of:

    print $host . " FAILEd to repond on " . $service . " " . $ports{ se +rvice } . "\n";

    So you see that if $port{ service } was undefined, you would get a concatnation warning. If you're interested, check out the output of perl -MO=Terse

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2023-05-28 02:27 GMT
Find Nodes?
    Voting Booth?

    No recent polls found