#!/usr/bin/perl use strict; use IO::Tee; use IO::String; my $email_body; my $tee = IO::Tee->new(\*STDOUT,new IO::String($email_body)); # create a new tee object and attach STDOUT and the email$ die $! unless $tee; $tee->autoflush(1); my ( $check_description,$check_result,$severity_w ); my $VERSION = 10.0; my $host = "test"; format HEADER = ____v@<<<< @<<<<<<<<<<<_____________________________________________________________________________________________ $VERSION, $host Description Check Result - Status-Severity ____________________________________________________________________________________________________________________ . format FAIL = @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -ERROR-@> $check_description,$check_result,$severity_w . format STD = @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> $check_description,$check_result . select STDOUT; $^ = 'HEADER'; # set the top of page format $~ = 'STD'; $check_description = "desc"; $check_result = "result"; $severity_w = "9"; write; print "EMAIL BODY:\n\n$email_body\n"; exit;