mark123 wrote: > Hi all, > > Can someone give me a hand understanding why I am getting this error. > > This script telnets into a telnet server (cisco) then telnets into other > cisco router to grab there configs. I get these errors when trying to > connect to certain routers (5, 11,12,13,14). If I look in my dump logs I see > that the device didn't echo anything back. I have play with some control and > break commnads wich help but doesn't fix all of them. I have a feeling it > has something to so with the filehandle or buffer but not sure. > > Either case can anyone tell me why I am getting Bad file descriptor at line > 94 ?? I have the line marked ****
That is good. It helps a lot Please do this again when you re-post. > > This is my first perl script so please don't laugh ;-( > > This is ussing active state on an XP machine. > This is perl, v5.6.1 built for MSWin32-x86-multi-thread > (with 1 registered patch, see perl -V for more detail) > > thanks for any help Hi Mark, It doesn't look like you are getting much response here. Might I suggest soe factors that are making it more difficult to read the code, and thus to offer cogent advice? 1. The code is too spread out to follow clearly. It is very difficult to understand or debug code when you need a telescope to see from one line to the next. I would recommend inserting a single blank line only when there is a shift in emphasis of the flow of execution. Such blanks lines should mean something. 2. Likewise, the code is too spead out in the horizontal direction. I would suggest using auto-indent with spaces rather than tabs, and keeping the indents to four spaces maximum. I would also suggest doing a hard break when lines get longer than 80 characters. You simply cannot debug what you can not see. I know this probably sound anal-retentive, but I frankly cannot follow this code, and others may also pass it over for the same reason. By making some simple adaptations that help us understand this code, you may also help yourself considerably. Just make a common-sense visual evaluation, and change the things that make the code hard to follow. Then repost. There are many willing helpers here. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>