Hi Martin, On Thu, 27 Feb 2014 15:33:57 -0600 "Martin G. McCormick" <mar...@server1.shellworld.net> wrote:
> I am running a script under perl -d and want to break > execution at line 243 in this case. > perl -d scriptname loads the script in to the debugger and b 243 > sets the break point. c then Enter starts the program which runs > until it reaches the desired line at which point it stops. All I > want to do is get it to loop multiple times through this point > and then stop. > > This is similar to the behavior of gdb where you could > tell it to stop after, say, 250 passes through the break point. I know of several options for that: 1. Use a package-scope count variable: e.g, do: «b 243 ((++$::_LINE_243) == 250)» 2. source a file (see "source" on "perldoc perldebug") that will contain several "c" statements. 3. Maybe try Devel::Trepan instead: https://metacpan.org/release/Devel-Trepan . Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Interview with Ben Collins-Sussman - http://shlom.in/sussman Only perl and Chuck Norris can parse Perl. — http://www.shlomifish.org/humour/bits/facts/Chuck-Norris/ Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/