Hello schrodinger, and welcome to the Monastery!
You should also look at the module Pry, by the Monastery’s own tobyink. From the documentation:
This module gives you a function called pry that you can drop into your code anywhere. When Perl executes that line of code, it will stop and drop you into a REPL. You can use the REPL to inspect any lexical variables (and even alter them), call functions and methods, and so on.
...
Once you've finished using the REPL, just hit Ctrl+D and your code will resume execution.
Hope that helps,