Hi bichonfrise74,

I've not seen that before, but if you try running the script utility (which spawns a new shell, and then records all I/O until you exit the shell, saving it to a specified textfile, or typescript by default), it might give you more clues about what's happening.

For example:

[liverpole@myhost ~]% cat example.pl #!/usr/bin/perl -w use strict; print "Enter: "; my $input = <STDIN>; [liverpole@myhost ~]% script output Script started, file is output liverpole@myhost# ./example.pl Enter: tes liverpole@myhost# exit exit Script done, file is output [liverpole@myhost ~]% cat output Script started on Wed Sep 23 17:46:45 2009 liverpole@myhost# ./example.pl Enter: tes liverpole@myhost# exit exit Script done on Wed Sep 23 17:47:08 2009

In the above example, the backspace key worked as expected, which you can see very clearly when you edit the script file "output", as the line with the backspace is revealed to be:

Enter: test^H ^H^M

Clearly it's doing a backspace, followed by a space (to erase the final 't' of 'text'), followed by another backspace.


s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

In reply to Re: STDIN Odd Bevahior in Linux Environments by liverpole
in thread STDIN Odd Bevahior in Linux Environments by bichonfrise74

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.