http://qs321.pair.com?node_id=184763


in reply to Can I clean this up??

open(FIL,">>$myfil") || die "No open for ct tot: $! \n"; if($ct == 1) { print FIL "\n$ct is down at this time.\n"; } elsif($ct >= 2) { print FIL "\n$ct are not available at this time.\n"; } system("mailx -s 'Mail header' myemail < $myfil"); close(FIL);
That should function the same without repeating the opening, mailing, closeing.

Notice: At the time I was writeing this response frankus was writeing it too and beat me to submiting, heh. sorry for repeating.
--
($good, $bad, $ugly) = split(/,/, "vi,emacs,teco")