srlbharu has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I am debugging my perl code using -d option. I Set a breakpoint at the first line of my named subroutine. Since that subroutine is called so many times, I want to set the break pointin that subroutine with some condition so that I can avoid some iterations.
Below is the code part of the subroutine:
Engine::Execute { : foreach (@commands) { $cmd = $_; if($cmd =~ /INITIAL/i) { unless (fork) { eval $cmd; if ($@) { print "When executing: $cmd\nFollowing error occured: $@\n" +; } exit; } } else { eval $cmd; if ($@) { print "When executing: $cmd\nFollowing error occured: $@\n"; } } } }I tried to set as b Engine::_Execute /INITIAL/i but my script runs without wait. Please let me know how to set the break point so that execution will continue until the line if($cmd =~ /INITIAL/i) hits.
|
|---|