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 and backspaces

 



Bucz
Novice

Nov 10, 2008, 1:15 AM

Post #1 of 1 (432 views)
Telnet and backspaces Can't Post

Hello there,

I have encountered a problem with telnet. I have solved it, but not in an 'elegant way', so maybe you have some idea.

Normally in a telnet when I receive some loooong message, a --more-- prompt appears and I need to press space to continue. Then --more-- disappears and text goes on. I have figured out, than to make --more-- vanish, telnet sends eight backspace [\b] characters. And with them I have a problem. When I print what I have received to a screen, it looks all fine. But when processing lines, it looks like:

Code
text text text 
--more--
backspace
backspace
backspace
backspace
backspace
backspace
backspace
backspace
text text text


I solved it that I skip --more-- and every backsace, but I don't find it good. I would like somehow to get --more-- and make backaces 'erase' this string as it happens when displaying, so I get only 'text text text' lines

Any idea?

 
 


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

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