From owner-freebsd-questions Mon Jul 5 17:21:34 1999 Delivered-To: freebsd-questions@freebsd.org Received: from mail.actrix.gen.nz (mail2.actrix.gen.nz [203.96.16.37]) by hub.freebsd.org (Postfix) with ESMTP id 3237914BED for ; Mon, 5 Jul 1999 17:21:27 -0700 (PDT) (envelope-from dan.langille@dvl-software.com) Received: from actrix.gen.nz (www@lemuria.actrix.gen.nz [203.96.16.20]) by mail.actrix.gen.nz (8.9.1/8.9.1) with SMTP id MAA28494; Tue, 6 Jul 1999 12:20:58 +1200 (NZST) From: "Dan Langille" Reply-To: dan.langille@dvl-software.com To: Burke Gallagher Cc: Anton Berezin , freebsd-questions@FreeBSD.org Date: Tue, 6 Jul 1999 12:21:01 nzst Subject: Re: running frequent cron perl scripts X-Mailer: DMailWeb Web to Mail Gateway 2.1t, http://netwinsite.com/top_mail.htm Message-id: <37814bed.5822.0@actrix.gen.nz> X-User-Info: 202.37.52.5 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >I have to agree with Anton, the original perl script is awful. I also >agree with his fixups 100%. Thanks. Again, no offense taken. >Now here is a version that uses sockets directly. My thanks for this. It would have taken me ages to write that. I think I need to get the PERL book. I've tried to implement this code on my box. This process is complicated by my use of webmail at the moment (I'm not at home) and the associated tricks the copy/paste is doing. I'm getting errors which make no sense to me: # perl get_ip.sh Not enough arguments for send at get_ip.sh line 54, near "$httpRequest )" syntax error at get_ip.sh line 119, near ".ne" syntax error at get_ip.sh line 126, near "}" Execution of get_ip.sh aborted due to compilation errors. The lines in question are: 54 send( SH, $httpRequest ); 119 if ($currentIP .ne. $lastIP) { print "change detected\n"; writeIP( $currentIP ); system "home/dan/dns_update.sh"; syslog( "The IP Address has changed to $currentIP" ); 126 } I'll be sure to post a working copy of the script once I have it running. I can imagine it would be useful to anyone using the Nokia M10. - Dan Langille To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message