dusk has asked for the wisdom of the Perl Monks concerning the following question:
I am writing a small script to automatically update the IP that a dynamic DNS points to (for myip.org).
The most efficient way that I can think of is to execute /sbin/ifconfig ppp0, and get the inet address, and store it in a scalar for processing
for example:
my $account = "blah"; my $password = "blah"; my $ip = exec "/sbin/ifconfig ppp0"; get ("http://www.myip.org/cgi-bin/Update.py?id=$account&pwd=$password& +hostname=all&ip=$ip");
However, in order for this to work, I need the IP in the URL to `get'.
Any assistance will be appreciated :)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: catching output
by AgentM (Curate) on Mar 04, 2001 at 02:22 UTC | |
Re: catching output
by mr.nick (Chaplain) on Mar 04, 2001 at 03:16 UTC | |
Re: catching output
by vladdrak (Monk) on Mar 04, 2001 at 14:04 UTC |
Back to
Seekers of Perl Wisdom