Another option is LWP::Online. Be aware, according to the docs, it a does a GET from Google, CNN, Yahoo and Amazon.
If I were doing this, I think I'd use LWP::Simple to GET from an page on my ISP's website. In part because if I can GET a page from my ISP then I know any other access problem is their's, not mine. (Of course, if there's website you want/need to make sure you can GET from, then test that, too.)
It might also be useful to GET your modem's status page. It can tell if your connection from your house or office to your ISP is up or not.