Gossamer Forum
Home : General : Perl Programming :

socket - router

Quote Reply
socket - router
Hi,
I need to make a socket connection with a router. I can make the connection (port 23) and can read some output with:
while(<$socket>){print $_;}
But I don't get all the output. For example, I can't see the promt of the router...
When I use @reply = @socket->getlines(); I get nothing at all.
There is also a read statement but I'm not sure about the sintax on that one...
I know you can use Net::Telnet:Cisco for this but that doesn't seem to work because the router I need to connect to is behind another one and has to be accesed through reverse telnet.. (I think)
Also, my boss really wants to see sockets...
Any ideas??
Quote Reply
Re: [karib] socket - router In reply to
Please make replies on this subject in your original thread.

As for:

@socket->getlines();

I expect you'd need:

$socket->getlines();

If you put:

use strict;

...at the top of your script you would have seen an error regarding that.
Quote Reply
Re: [Paul] socket - router In reply to
I'm sorry, I made a little mistake. I do use $socket->getlines(); and not @socket->getlines();
use strict and use warnings are both on but they don't complain about anything.

also sorry about my new post...