http://www.perlmonks.org?node_id=1022168


in reply to Setting break point for particular condition in the subroutine

> I tried to set as b Engine::_Execute /INITIAL/i but my script runs without wait.

you're setting a breakpoint on the routine with a condition which checks $_ which doesn't make much sense.

If I where you I would set the breakpoint at first line of body of if($cmd =~ /INITIAL/i) condition, that is unless (fork)

There is more than one way to do it.

Find the line number by investigating the routine with l Engine::_Execute and set b line_number.

Or manipulate your source and include $DB::single=1 before the line you want to break.

Cheers Rolf