It looks like the web data that you are shooting at really exists and has the properties expected in the script. But I'm curious about the timing of the script's behavior.

Given today's date, the settings for $mintime and $maxtime yield a span of about 28 months (from April 3 2005 to Aug. 8 2007), or about 850 days, give or take. In your "for" loop, which iterates over that span one day at a time, there is a "sleep(1)" (very polite).

Does the script run for nearly 15 minutes and produce no output whatsoever? Or does it run for a very short time?

Apart from that, the use of a module called "Mysql" seems outdated. You should be using a module called DBI, which in turn uses a "driver" module called DBD::mysql.

As for the "save_to_db" module, that's not on CPAN, and the only people who have encountered it are probably people who have read that same "Safari book called Baseball Hacks". The problem might be in that module, but you haven't shown it here (and I don't have a copy of that book).

There is a print statement that precedes the for loop, and if you are not seeing a line like "iterating from Sun Apr 3 00:00:00 2005 to ...", then the script must exiting before it reaches that print statement. (This would also suggest that the script is exiting very quickly, rather than running for 15 minutes.)

You could try stepping through it with the perl debugger; run it at the command line like this:

perl -d name_of_script
You'll be prompted by the debugger for things to do; you can start with "h" to see a brief summary of debugging commands (like "s" to step, "b line#" to set a breakpoint, "c" to continue execution, etc.) You might also find it worthwhile to read the output of "perldoc perldebug". You'll get copious warnings and diagnostics as you step along this way, and you can look up messages you get in the perldiag manual.

In reply to Re: Blank result but no error by graff
in thread Blank result but no error by nase

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.