in reply to Looping
open(MAIL, "|/usr/lib/sendmail timekeeper@superaccurateclock.com"); print MAIL <<END; From: Number Printer <numprint\@printnum.com> Subject: What Year is it? Please enter the year below and reply. Year: END close(MAIL); # ok, now watch our mail spool for the answer open(SPOOL, "tail -f /var/mail/spool/numprint |"); while(<SPOOL>) { if(/Year: (\d+)/) { $year = $1; last; } } close(SPOOL); # now we know for sure what year it is, we can use any # of the other suggestions to print the numbers
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Looping
by samtregar (Abbot) on Jun 25, 2002 at 22:04 UTC | |
by bronto (Priest) on Jun 26, 2002 at 09:05 UTC |