Install libreadline-dev, which contains the ReadLine library and headers for saving and retrieving command execution history, with the apt command.
sudo apt install -y libreadline-dev
How to use Perl's debugger command line history
The command history feature of Perl Debugger depends on a module called Term::ReadLine::Gnu. Relies on the ReadLine library written in C.
If you're running the Perl debugger on Ubuntu and the command history doesn't work with the up and down keys, suspect that the Term::ReadLine::Gnu library isn't installed.
After installing the libreadline-dev package, install Term::ReadLine::Gnu using cpanm.