if (open FH, $log) { ....send tail of log file... } else { ....send "server is down. Perl say $!" }