473,238 Members | 1,851 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,238 software developers and data experts.

Perl telnet looping problem

Can someone look at the code below and tell me whats going on?

Here is the problem. I can successfully telnet one of our routers and
successfully put in a command in the while statement, but when the loop goes
around a second time, it gives me:
"pattern match timed-out at c:\filename.pl line 21"

It can't get past the waitfor statement for a prompt the 2nd go around in
the loop.


================================================== ====

use Net::Telnet;
use constant PASS=>'password';

$telnet = new Net::Telnet (Timeout=>25);


$telnet->waitfor('/assword: /');

while ($i < 6400) {

print "LOOPED!!!\n"; 'for troubleshooting purposes
$prompt = $telnet->waitfor('/> /');
print "MADE IT PAST PROMPT\n"; 'for troubleshooting purposes

$statement=('<command goes here>');

print "PORT FILTER ADDED\n"; 'for troubleshooting

Jul 19 '05 #1
0 7241

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Lionel | last post by:
Hi all, I would like having more informations on how we could exchange informations and/or objects between PERL and JAVA. We have a Java programs that open, maintain and close telnet...
by: Vinay Gupta | last post by:
Hi, In a Perl to Tcl conversion project, I am planning to use the following Tcl extensions as a replacement for some Perl libraries. My development environment is Windows. Win32::OLE --> "DDE"...
by: Kai Thorsrud | last post by:
Hi I'm currently into converting a perl linux app into a .Net windows service. The application monitors our syslog log files to capture i.p adress changes on some of our routers having dynamic...
by: Patricia Mindanao | last post by:
I want to call cgi perl scripts on my web hosters server from my HTML web pages (on the the web hosters server too). It occurs sometimes (especially during development phase) that these cgi-perl...
by: perlxyo999 | last post by:
Hi , I have a problem doing manipulation (like split) in string comeing back from telnet commnd : $HOST = 'xxx'; $USER = 'yyy20'; $PASS = 'yyy-pass'; #$telnet = Net::Telnet->new($HOST);...
by: susinthaa | last post by:
Hi, How to use a solaris mount command in perl? I tried that telnet to the solaris machine. For that solaris machine, how can I give the username and password? use Net::Telnet; use...
by: johnyboy1230987 | last post by:
I am running my perl on linux trying to connect to window via telnet. How can I overcome the "Mode:" prompt? as you know when you telnet a window box you will be prompted with "Mode" I tried...
by: sherrygomindes | last post by:
Hi I have written a perl script using the Telnet module. I need to remotely login in from one windows XP machine to another XP machine. But i get errors which i can't figure out the reason....
by: ravimath | last post by:
Hi all , I have written script to view some router output , my script executes successfuly , but does'nt show any output, why ?, it always shows output as 1. use Net::Telnet; use Term::ReadKey;...
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.