In all my Perl installations, on very different machines using different versions of Perl (up to v5.36, which is the latest at the time of writing), upon invoking the Perl debugger using perl -d SomeModule.pm, I have trouble using the keyboard as I am used to in the shell. Readline seems broken, as if sshing to a host without exporting TERM=xterm, first.
up prints ^[[A instead of accessing a history, home prints ^[[H instead of moving the cursor, end prints ^[[F, etc.
How can this be fixed?