#!/usr/local/bin/perl -w use strict; my @uptime = split //, `uptime`; my ($to,$from,$subject) = ('mail@list.com','sys@admin.com','ALERT : reboot'); if ($uptime[2] > 1 ){ open(MAIL, "|/usr/sbin/sendmail -t"); print <