|Don't ask to ask, just ask|
Socket Handle not sending data ?by evilkamikaze (Initiate)
|on Jul 09, 2009 at 02:26 UTC||Need Help??|
evilkamikaze has asked for the
wisdom of the Perl Monks concerning the following question:
I am stuck in a problem and can't figure out what's going on.
What I am doing is this:
I have an array of ports that I need to connect to. For each port in this array I call a function ConnectToPort.
ConnectToPort function creates a socket, and if it successfully connects to the given port (which we have passed as argument) it adds the socket file handle into a text file along with the port number. Now when I read this socket file handle from the file and try to send something on that file handle, I get an error stating that Can't locate object method "send" via package "IO::socket::INET"
I am guessing that it is because when I wrote the socket file handle to a file, it is converted to string. (pardon me if this is really stupid. I am new to perl)
Any help would be greatly appreciated.