----- Original Message -----
From: "Michael D. Smith" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, November 02, 2005 10:23 AM
Subject: Checking for internet connection
>
> Is there a right way/best way to check for an internet connection?
>
> Now I'm using LWP simple to retrieve a webpage, if that fails, just
assuming no
> connection. It's fast when it works. I like fast, but that assumption is
> not always
> correct and causes the script to fail inelegantly when it isn't. I hate
> inelegant :)
>
>
> Must be a better way. Any thoughts appreciated.
>
Checking for a dial-up connection ? I used to do it on 98 and 2000 with
something like:
use Win32::RASE;
use strict;
use warnings;
my ($entry, $hrasconn) = RasEnumConnections();
if ($hrasconn) {print "Connected to $entry\n"}
else {print "Not connected\n"}
But that module is rather old and may have been superceded by something
else.
Cheers,
Rob
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs