laziness, impatience, and hubris | |
PerlMonks |
Re: Setting break point for particular condition in the subroutineby rjt (Curate) |
on Mar 07, 2013 at 08:15 UTC ( [id://1022167]=note: print w/replies, xml ) | Need Help?? |
It sounds like you want to insert the breakpoint at the if ($cmd =~ /INITIAL/i) line. Let's say that's line 123. Then, type: b 123 $cmd =~ /INITIAL/iSetting it to the subroutine entry is problematic because $cmd isn't set yet (or at least isn't set to a member of @commands. In addition to that, simply using /INITIAL/i as your condition would be running that regexp on $_, not $cmd. See perldebug for more info.
In Section
Seekers of Perl Wisdom
|
|