in reply to Capturing Telnet Command Outputs on Windows 2000 machines
Perhaps the methods waitfor and readline can help you?
Note, I don't have any experience with Net::Telnet, I only saw that those two methodes where used in the examples in the Net::Telnet-doc.
Update: you should also be using 'or' instead of '||' for error checking. (It doesn't make any difference when you use 'die', but it is IMHO bad practice.)
Update2: your open-statement is not that good either. There is a three-param version of open, which would allows you to do: open(FH, ">", "filename"); which is what you try to accomplish by appending $write_file to the file name (which is less safe).
|
|---|