Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Term::ReadLine::Gnu vs. history control

by LanX (Chancellor)
on Dec 06, 2012 at 01:39 UTC ( #1007444=note: print w/ replies, xml ) Need Help??

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

Comment on Re: Term::ReadLine::Gnu vs. history control
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1007444]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2015-11-27 09:30 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (722 votes), past polls