...even when I use die to try to kill it...

So, it must be hanging before it reaches the "silly" die statement. Do you see the output of  print $result; and does the email from the Mail::Sender call get delivered? Is the spreadsheet file that you're fetching in GetSNPfile being saved to local disk, and is it readable by another application (e.g. Excel(tm))?

Just for grins, try "use strict" (it's not that hard in this case), then try enclosing the DBI and Mail::Sender stuff inside their own blocks (or each in its own sub, like you've done with the LWP part), so that the objects will go out of scope and connections will be closed if/when you leave the block or sub.

You could also try stepping through it with the perl debugger, to see what it is trying to execute when it hangs. (You can even step into a given module call, if you establish that it's not returning from there.) As you step along, check the values of variables that are about to be passed to a module, to make sure they contain what you intend/expect.


In reply to Re: Script no longer exiting by graff
in thread Script no longer exiting by SamCG

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.