in reply to why is it taking so long to read all the lines in net::Telnet

I suspect your problem is that getlines "reads and returns all the lines of data from the object until end of file is read." and that getlines does not read end of file unless the remote end closes the telnet connection. In the mean time it waits and keeps reading any output produced, until it times out.

Update: which is what pc88mxer already said, now that I read it again.

  • Comment on Re: why is it taking so long to read all the lines in net::Telnet

Replies are listed 'Best First'.
Re^2: why is it taking so long to read all the lines in net::Telnet
by poolboi (Acolyte) on Apr 22, 2008 at 05:51 UTC
    hm...alright so is there any way i can make the program recognise after i type in my password, it returns the results to me immediately and not take such a long time?
      Yes, delete the line @ok = $t->getlines;