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

Re: Ascii value is different

by almut (Canon)
on Apr 19, 2010 at 12:56 UTC ( #835479=note: print w/replies, xml ) Need Help??


in reply to Ascii value is different

Term::Screen calls stty raw -echo under the hood, which unsets the tty feature "translate carriage return to newline" (icrnl) — i.e. "raw" means (among other things) -icrnl.

Not sure if there are better ways... but a quick hack might be to patch Term::Screen to issue stty raw -echo icrnl instead, or maybe call stty icrnl yourself from your script after having used Term::Screen  (haven't tested it for side effects, though).

Your script with Term::Screen commented (just for demo):

$ stty -icrnl $ ./835470.pl Your name: a--97 b--98 --13ine got at 13 $ stty icrnl $ ./835470.pl Your name: a--97 b--98 Newline got at 10 --10

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://835479]
help
Chatterbox?
[erix]: comic relief: how to start a riot and a fortune at the same time
[beech]: :) thats too generous to jdporter, don't start none won't be none -- there is about two decades (rounding up) worth of "ineffective" node titles -- leave the pope alone :p
[erix]: infallibility breeds inquisition

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2017-01-17 23:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (159 votes). Check out past polls.