Hi jimhenry, To try to help you, I thought I would run your program and see how the execution differs from what's expected.

I quickly realized that you omit any of the code in the main program.

Well that shouldn't take me too much more work, I'll just see what you wrote (something about text files), and see if I can cobble together something small that calls slow_print.

Then I looked at slow_print, and saw that it depends on an externally defined array called @paras, an external variable $rewrap_margin, and at least two external subroutines, rewrap and handle_keystroke.  (By "external", I mean external to what you gave us; maybe in the main program or some library?).

My point is, I've now lost interest.  There are plenty of other questions where the poster is giving enough information for me to get to the fun stuff; the actual sleuthing of the problem.  To do that with your code one has to anticipate the definitions of two other data structures and two other subroutines, as well as guess how you might have called this subroutine.  Sorry, but that's work!

Please consider providing a small, standalone program which runs on its own, and illustrates the problem.  Then I'll be glad to come back and take a look, knowing that I can dive right into solving the problem.


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

In reply to Re: Problem with ReadKey by liverpole
in thread Problem with ReadKey by jimhenry

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.