in reply to Re^4: How to pass --MORE--
in thread How to pass --MORE--

It seems list would give you the full list of commands.

The problem with your code may be the device not sending a CRLF after the --MORE-- prompt, so getline just stalls waiting for one.

Try using the following code instead:

while(1) { my $match = $telnet->waitfor(Match => '/^--More--$/i', Match => '/^Mediant 800 >/i', Mathc => '/.*$/'); last unless defined $match; if ($match =~ /^--More--/i) { $telnet->print(' '); # ignore line } elsif ($match =~ /^Mediant 800 >/i) { # back at command prompt; last; } else { push @lines, $match; } }