in reply to Re: Re: Pattern Matching With Regular Expressions
in thread Pattern Matching With Regular Expressions

This doesn't work. It doesn't appear to substitute the bold in and I don't know why. I've tried tr with the same result. Anyone know what's wrong?
  • Comment on Re: Re: Pattern Matching With Regular Expressions

Replies are listed 'Best First'.
Re: Re: Re: Pattern Matching With Regular Expressions
by graff (Chancellor) on Apr 28, 2004 at 03:50 UTC
    Have you ever heard of running perl in "debug" mode? It's really cool, and if you haven't tried it, you're missing a lot. Check out "perldoc perldebug", then run your script with
    perl -d name_of_script [command line args for @ARGV]
    While the debugger is running your script, you can type "h" to get a brief summary of debugging commands; use "b findtext" to set a breakpoint in the sub, so whenever the execution enters that function, it stops to let you decide what to do next. At that point, you can step through a line at a time, set additional breakpoints, inspect current values of variables, and so on.

    Since you have not posted the surrounding code that is calling the findtext sub, you're on your own. (I did say the code was not tested...) Post another reply if/when you get some firm, clear evidence about a specific problem, after trying a couple diagnoses and solutions on your own, in case you still can't figure it out at that point.