Yeah, that's one of the first things I tried myself - in several different ways. Didn't work out for me either.

As to SetHistory, the docs say

  "SetHistory(LINE1 [, LINE2, ...])"
  sets the history of input, from where it can be used if the actual "readline" is present.

That implies, to me, that the lines get saved to a "history" (however that's implemented internally) rather than allowing the option of saving to an array. I suppose I could 1) read each line as it comes in, 2) save it to the appropriate array, 3) clear the history (at each prompt) and load it from the array... but that seems like I'd be reimplementing 90% of the module just to get that extra bit of functionality.

I'm guessing that it's possible to do this; I was just hoping that someone here would have actual experience with this aspect of the module. I'll keep grinding away at it, though, and report the results if no one else has a definite answer.


-- 
Human history becomes more and more a race between education and catastrophe. -- HG Wells

In reply to Re^2: Term::Readline - are multiple histories possible? by oko1
in thread Term::Readline - are multiple histories possible? by oko1

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.