in reply to Navigating history of STDIN-multiliners after 'perl RET'

Once you type 'perl RET', an executable named 'perl' will be started. That program (presumably) will go on to read STDIN and execute it as perl script.

It'd be rather strange for scripts to be self-editing. E.g. your DATA section might contain escape sequences and so on. In theory, one could have perl act differently (launch an IDE) when run on a terminal with no arguments. Via sitecustomize perhaps or by creating a 'perl' wrapper script. You try it, see how it works.

Or you could do what everyone else does: use perl -e '...' multiliners. Or perhaps echo '...' | perl. In other words, edit/enter the script as part of the command line.