in reply to Script no longer exiting

...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.