Debugging with the built-in command line debugger, with Devel::ptkdb, or with print statements.

Download: mp4 ogv webm

See the full article about debugging Perl scripts

An alternative screencast where you can actually see a live debugging session.

Devel::hdb is another debugger you could give a try.