in reply to Re^3: foreach in HoHoA problems
in thread foreach in HoHoA problems

Just using "b" (set breakpoint) and "B" (delete breakpoint) will also save you tons of debugging time: you provide a line number or a subname (e.g. "b 384" or "b bigsub"), and you can even add a condition (e.g. "b 384 (!defined $hit)". I often set a bunch of breakpoints before starting a script that has a set of "interesting" branches.

Then do "c" (continue), and it will stop if/when it gets to any breakpoint. If the script has "use Data::Dumper", you can do "p dumper( $ref_variable )" to see how (some portion of) your data structure looks at that point.

And that is just the tip of the iceberg.