Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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

by LanX (Saint)
on Dec 06, 2012 at 01:39 UTC ( [id://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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (2)
As of 2025-12-07 19:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (86 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.