CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Telnet, print FILE and multiple pages

 



Bucz
Novice

Nov 3, 2008, 2:33 AM

Post #1 of 1 (527 views)
Telnet, print FILE and multiple pages Can't Post

Hello,

I have encountered a following problem: I am using Telnet to connect some remote device (switch). I want to send a command to it, receive it's configuration and save it to a file. The configuration is long, so when browsing it normally I need to press 'space' when '--more--' appears. So, in the script I do ...->waitfor and catch --more--, then I send ' ' and all is OK.

Then the strange behavior occurs. When I print ($prematch, $match) from ->waitfor function to the screen with 'print' , all is OK. But when I print it to file with 'print FILE', it also saves '--more--' strings that were not printed previously :(

Any clue what is happening?

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives