Add the line where you want the execution to stop:
$DB::single = 1;
$ PERLDB_OPTS=NonStop perl -d program.pl
Add the line where you want the execution to stop:
Then, run your program as: See: http://perldoc.perl.org/perldebug.html