Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

When using the Perl debugger and I try to hit arrows up/down, it gives the following characters.
arrow up ==> ^[[A arrow down ==> ^[[B
Can this be changed so that arrow up/down shows the histories of what you typed?

Replies are listed 'Best First'.
Re: Perl Debugger Command-Line
by repellent (Priest) on May 07, 2010 at 01:14 UTC
      Install Term::ReadLine::Perl from CPAN.

      Whoa! Thanks! All this time, I've been wondering why "perl -d ..." on my mac hasn't been doing the right thing when I try to arrow up to previous debugger commands... This was the solution to my problem!

      Dude, you have improved the quality of my life.

      (So how come Term::Readline::Perl is part of the core distro on macosx????)

Re: Perl Debugger Command-Line
by Khen1950fx (Canon) on May 07, 2010 at 02:07 UTC
    Here's brief post that sums it up. You'll probably need Term::ReadKey too. Or run this, and you're good to go.
    #!/usr/bin/perl use strict; use warnings; use CPAN; CPAN::Shell->install( "Term::ReadKey", "Term::ReadLine::Gnu", "Term::ReadLine::Perl");
Re: Perl Debugger Command-Line
by Dumu (Monk) on Sep 05, 2016 at 16:09 UTC

    I'm currently using Perl 5.24 on top of Ubuntu. I had to install:

    • Term::ReadKey
    • Term::ReadLine
    • Term::ReadLine::Gnu
    • Term::ReadLine::Perl5
Re: Perl Debugger Command-Line
by bichonfrise74 (Vicar) on May 07, 2010 at 03:03 UTC
    Thank you too!!