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
In reply to Re: Looping
by robobunny
in thread Looping
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |