ellem has asked for the wisdom of the Perl Monks concerning the following question:
I have all manner of fancy plans after I get this working but the until loop seems to be wrong. I have compared it to the ones I have written before and to the explanation in the Camel (PP3 pp. 112-116) and I have noticed that I have no if statement but I don't know what I would put in an if statement anyway. (That makes me a pretty poor programmer doesn't it?) I say this becuase I want to say:#! /usr/bin/perl -w use strict ; use Mail::Sendmail; use diagnostics ; open (PING, '+> C:\PING\PING.TXT') or die "Can't create file; $!" ; # intentionally clobbering file my $pingstat = 0 ; my $ping = `ping -t 132.163.4.101` ; until ($pingstat) { $ping ; } else { $pingstat = 1 ; } my %mail = ( To => 'lmoran@wtsg.com', From => 'ellem@opt_online.net', Subject =>"The PING is dead!", Message =>"Go read your PING log" ); format PING = @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $ping .
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(shockme) Re: until Loop Question
by shockme (Chaplain) on Dec 14, 2001 at 02:14 UTC | |
|
Re: until Loop Question
by lestrrat (Deacon) on Dec 14, 2001 at 02:38 UTC | |
|
Re: until Loop Question
by chromatic (Archbishop) on Dec 14, 2001 at 05:00 UTC | |
by ellem (Hermit) on Dec 14, 2001 at 05:51 UTC | |
by lestrrat (Deacon) on Dec 14, 2001 at 06:06 UTC | |
|
Re: until Loop Question
by cfreak (Chaplain) on Dec 14, 2001 at 02:39 UTC | |
by lestrrat (Deacon) on Dec 14, 2001 at 03:39 UTC |