http://www.perlmonks.org?node_id=1007444


in reply to Term::ReadLine::Gnu vs. history control

works for me!
use Term::ReadLine; $term = new Term::ReadLine 'ProgramName'; print "Using: ", $term->ReadLine, "\n"; # is Gnu install +ed? $|=1; $term->MinLine(); while ( defined ($_ = $term->readline('prompt>')) ) { print "$_\n"; next if (/not/); $term->AddHistory($_); }

Using: Term::ReadLine::Gnu prompt>a a prompt>not b not b prompt>a a

a was in history, b was not.

Cheers Rolf