in reply to Re: Net::Telnet waitfor loop
in thread Net::Telnet waitfor loop

Sorry for the delay in updating. To many 'must be done now' issues. Currently I am getting nothing in the NVFILE (zero byte file). If I wasn't trying to loop, I can get the first page of the on-screen report. I am using strict & warnings - I will check on the three arg open. I have not yet used the dump log feature on this. I also suspect that it is timing out.

Replies are listed 'Best First'.
Re^3: Net::Telnet waitfor loop
by sonicscott9041 (Novice) on Aug 20, 2009 at 20:27 UTC
    Dump_log and Input_log both show that I am getting the first page of the on-screen report. It indeed IS dying on the until line. Here is the updated code:
    until ($t->waitfor('/REPORT FINISHED/') == 1) { ($op1) = $t->waitfor('/PAGE/'); print NVFILE $op1; ($op2) = waitfor('/PRESS RETURN/'); print NVFILE $op2; $t->print(""); }
    Thanks!

      Hmm...maybe your $t->output_record_separator() is set to something weird? (or, in any event, something inconsistent with what the machine at the other end is expecting)

      I'm having trouble coming up with other explanations. If it doesn't time out, and it doesn't fail to match, it ought to be sending the \n across the wire when prompted unless the ORS is fouled up. I'm not sure why you broke up the match into two pieces here, but I don't think that should matter.