I normally ask questions about debugging because it seems to be an area of discontent for some Win32 users. Perhaps it is an aversion to the command line? You start a debugging session like so:
perl -d scream.pl
And you wind up in a strange screen with line numbers and package information and what-not on the left hand side. Type the letter l ("L" and not the number one) to see the current line:
DB<1> l 5==> my $text = "my text [and maybe|and here's] more text [the end| +stop]"; 6: my @arr = parseit($text); 7: print "$_\n" for @arr; 8 9 sub parseit { ...
And use b to set a breakpoint. The small letter r will run you to that breakpoint:
DB<1> b 7 DB<2> r main::(scream.pl:7): print "$_\n" for @arr; DB<2>
Now, to look at variables you can print them out, using p:
DB<2> p @arr my text and maybe more text the endmy text and maybe more text stopmy +text and h ere's more text the endmy text and here's more text stop DB<3>
Or, much better, you can examine them using x:
DB<3> x @arr 0 'my text and maybe more text the end' 1 'my text and maybe more text stop' 2 'my text and here\'s more text the end' 3 'my text and here\'s more text stop'
When you are done you can use the single letter q to get out of the debugging session. There is more to it, but that is the basics. Perldoc perldebug tells you all this and so much more. Give it a whirl.

Celebrate Intellectual Diversity


In reply to Re^3: Win32::ODBC query error by InfiniteSilence
in thread Win32::ODBC query error by nicpon

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.