Discussion Locked

How to use "expect" within a Perl Script

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I'm using 'expect' within a perl script and I'm expecting "More..." from a router then send "\r" to proceed with next listing of data but cannot seem to get this part of the code to work.
Can anyone help!!!!!!
e.g.

#!/usr/local/bin/perl
#!/usr/local/bin/expect

variable declaration and statement......

# Inbound Frames Discarded

@lines = $sparky->cmd("next pport.2.2.18");
sleep $cmd_wait;
sleep $cmd_wait;
expect "More...";
send "\r";
print OSWITCH "\n ...etc

Please....

Cliff

1 reply

This discussion is closed to new replies.