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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |