[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Thanks...I'll try that



>Thanks for the help,
>
>I'll try doing some silly HTTP stuff or something.  But I'm also kind of
>interested in Open Transport.  If/How MacPerl interacts with OT?  Is
>there are way I can write a script that detects whether my computer is
>connected to the Internet?
>
>Sveinbjorn Thordarson
>Reykjavik, Iceland
>
># ===== Want to unsubscribe from this list?
># ===== Send mail with body "unsubscribe" to macperl-request@macperl.org

The following simple script is what I use to check if my server is up, use
your http address where appropriate.  The first check demonstrates the use
of a variable for the server address, the second has the address
"hardwired".  Both check for the server returning an HTML page head (so it
really checks for the existence of a valid HTML page).

 This comes straight out of the pod for the various modules.  It can
probaly be greatly improved by those more Perl literate than I.  Caveats:
if the server is not responding, MacPerl just waits w/spinning cursor.  I
usually just stop the script from the File menu, I don't know if it would
time out on its own.  HTH.

Jane

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org