A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Perl debugger basics

start the debugger with perl -d script.pl

  • n - next step
  • s - step into
  • c - continue
  • b 100 - break at line 100
  • b sub - break at sub 'sub' (must be in the right file)
  • { v - display the surrounding lines before each step
How could I do p "-" x 100; v in one step?
  • w $var - watch variable $var (displays changed $var and stops)