Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: While i am executing a perl script in that one file will get as ouput in that ^M is priting and the actual output is getting disabled?

by cavac (Parson)
on Apr 04, 2022 at 08:52 UTC ( [id://11142656]=note: print w/replies, xml ) Need Help??


in reply to Re: While i am executing a perl script in that one file will get as ouput in that ^M is priting and the actual output is getting disabled?
in thread While i am executing a perl script in that one file will get as ouput in that ^M is priting and the actual output is getting disabled?

As stated in the WIkipedia article (but not properly elaborated on): The reason that carriage return and linefeed are two different characters is mechanical constraints: On old Teletype (TTY) machines it takes about the time of two transmitted characters for the carriage to return to the starting position, but only one to advance the paper one line.

So the encoding allows for the additional time requirement by always requiring to send carriage return first, followed by a linefeed. This provides that characters can be send non-stop at maximum (45 Baud) speed in normal use (for example using a paper tape as source). While still giving the option of using CR and LF separately for specific purposes (CR alone for overwriting a line, LF alone as sort of vertical tabulator).

CuriousMarc has a nice demonstration of these early mechanical teletypes on his Youtube channel.

Cynic me suspects these work about the same speed as a modern Windows cmd.exe, which is why Windows still uses CR+LF ;-)

perl -e 'use Crypt::Digest::SHA256 qw[sha256_hex]; print substr(sha256_hex("the Answer To Life, The Universe And Everything"), 6, 2), "\n";'

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11142656]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-03-29 02:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found