Results 1 to 2 of 2

Thread: Need help with Term::ReadLine in Perl

  1. #1
    Join Date
    Jan 2006
    Beans
    173
    Distro
    Ubuntu 9.10 Karmic Koala

    Need help with Term::ReadLine in Perl

    I realized while using a program that I was creating, that in order to scroll back in history, I had to press the up arrow key twice, as oposed to how it should be (once) how can I fix this? Here is a sample program in which I would have to press up twice on my machine:
    Code:
    #!/usr/bin/perl
    
    $ENV{PERL_RL}='Gnu o=0';
    use Term::ReadLine;
    $term = new Term::ReadLine 'Test';
    $prompt = "-> ";
    
    while( defined ($_ = $term->readline($prompt)) && $_ ne 'exit') {
    
    $term->addhistory($_);
    }
    pianoboy3333

  2. #2
    Join Date
    Jan 2006
    Beans
    173
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Need help with Term::ReadLine in Perl

    No one knows how to only have it so that I only have to press up once?
    pianoboy3333

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •