develooper Front page | perl.beginners | Postings from March 2002

xmit Perl code for carriage return during telnet session

Thread Next
From:
John
Date:
March 17, 2002 21:15
Subject:
xmit Perl code for carriage return during telnet session
Message ID:
000001c1ce3b$e5655420$6701a8c0@rochester.rr.com

I do not understand the results of the following experiment, and would
appreciate input.

Using telnet on a Win PC, I executed this code:

	perl -e ‘print "Hello world.\n\r"' > /dev/tty1

On my Linux system monitor (/dev/tty1), I see "Hello world." printed along
with the newline and carriage return.

What I don't understand is why I don't see a return of my Linux screen
prompt until I hit the Enter key on that system.

Should I be flushing some sort of buffer, closing a file, or transmitting
some other code sequence to indicate an end to my output?

TIA

John–




Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About