in reply to While loop - telnet module question
Take a look at the documentation for Net::Telnet: getline() takes a Timeout parameter.