Sharan Basappa wrote:
Hi,

Hello,

I am using debugging for a program of mine.

The debugger exits probably after a regex match fail. I am not sure
why it should exit.
Any ideas, clues?

Regards

main::(StTrAuto.pl:106):          my @new_auto_tr = ();
  DB<2> s
main::(StTrAuto.pl:107):          foreach $temp (@auto_tr)
main::(StTrAuto.pl:108):          {
  DB<2> s
main::(StTrAuto.pl:109):            if($temp =~ m/^$start_state)/)
main::(StTrAuto.pl:110):            {
  DB<2> s
Unmatched ) in regex; marked by <-- HERE in m/^0) <-- HERE / at
  ^^^^^^^^^^^^^^^^^^^^^
The reason is that you have a right parenthesis without a left parenthesis to the left of it. Parentheses are special is a regular expression so to match a literal parenthesis you have to put a backslash in front of it like: \)

perldoc perldiag
[ snip ]
    unmatched ( in regex; marked by <-- HERE in m/%s/
        (F) Unbackslashed parentheses must always be balanced in regular
        expressions. If you’re a vi user, the % key is valuable for
        finding the matching parenthesis. The <-- HERE shows in the
        regular expression about where the problem was discovered. See
        perlre.


John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to